Skip to content

Commit

Permalink
Add some Doxygen @brief lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
anse1 committed Jun 2, 2016
1 parent ac945c3 commit 279980b
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dump.hh
@@ -1,3 +1,5 @@
/// @file
/// @brief Dump syntax trees as GraphML
#ifndef DUMP_HH
#define DUMP_HH

Expand Down
3 changes: 3 additions & 0 deletions expr.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief grammar: Value expression productions

#ifndef EXPR_HH
#define EXPR_HH

Expand Down
3 changes: 3 additions & 0 deletions grammar.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief grammar: Top-level and unsorted grammar productions

#ifndef GRAMMAR_HH
#define GRAMMAR_HH

Expand Down
5 changes: 3 additions & 2 deletions impedance.hh
@@ -1,5 +1,6 @@
/* Provide feedback to the grammar about failed queries to weed out
unsupported productions. */
/// @file
/// @brief feedback to the grammar about failed productions


#ifndef IMPEDANCE_HH
#define IMPEDANCE_HH
Expand Down
7 changes: 7 additions & 0 deletions log.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief logging

#ifndef LOG_HH
#define LOG_HH

Expand All @@ -7,12 +10,14 @@

#include "prod.hh"

/// logger base class
struct logger {
virtual void generated(prod &query) { }
virtual void executed(prod &query) { }
virtual void error(prod &query, const pqxx::failure &e) { }
};

/// logger for statistics collection
struct stats_collecting_logger : logger {
long queries = 0;
float sum_nodes = 0;
Expand All @@ -21,6 +26,7 @@ struct stats_collecting_logger : logger {
virtual void generated(prod &query);
};

/// stderr logger
struct cerr_logger : stats_collecting_logger {
const int columns = 80;
std::map<std::string, long> errors;
Expand All @@ -31,6 +37,7 @@ struct cerr_logger : stats_collecting_logger {
void report(prod &p);
};

/// logger to postgres database
struct pqxx_logger : stats_collecting_logger {
long id;
std::shared_ptr<pqxx::connection> c;
Expand Down
5 changes: 5 additions & 0 deletions prod.hh
@@ -1,14 +1,19 @@
/// @file
/// @brief Base class for grammar productions

#include <string>
#include <iostream>

#ifndef PROD_HH
#define PROD_HH

/// Base class for walking the AST
struct prod_visitor {
virtual void visit(struct prod *p) = 0;
virtual ~prod_visitor() { }
};

/// Base class for AST nodes
struct prod {
struct prod *pprod;
struct scope *scope;
Expand Down
3 changes: 3 additions & 0 deletions random.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief randomness

#ifndef RANDOM_HH
#define RANDOM_HH

Expand Down
3 changes: 3 additions & 0 deletions relmodel.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief supporting classes for the grammar

#ifndef RELMODEL_HH
#define RELMODEL_HH
#include <string>
Expand Down
3 changes: 3 additions & 0 deletions schema.hh
@@ -1,3 +1,6 @@
/// @file
/// @brief schema information for grammar

#ifndef SCHEMA_HH
#define SCHEMA_HH

Expand Down

0 comments on commit 279980b

Please sign in to comment.