#ifndef BUGS_MODEL_H_
#define BUGS_MODEL_H_

#include <vector>

#include <model/Model.h>
#include <model/SymTab.h>

/**
 * For a BUGS model we need to store extra information with the monitor
 * This is only required to get output in CODA format, which is a bit
 * of a nuisance.
 */
struct BUGSMonitor
{
  NodeArray const *array;
  Range *range;
  TraceMonitor const *monitor;
};

/**
 * @short BUGS model 
 *
 * A BUGS model is a subclass of model that contains a symbol table
 * which is used to store certain nodes in arrays.  The array format
 * gives a convenient way of looking up nodes by name.
 */
class BUGSModel : public Model
{
  SymTab _symtab;
  std::vector<BUGSMonitor> _bugs_monitors;
  public:
  BUGSModel();

  SymTab &symtab();
  void addDevianceNode();
  TraceMonitor const * setMonitor(std::string const &name, Range const &range, unsigned int thin);
  void clearMonitor(std::string const &name, Range const &range);
  void coda(std::vector<Node const*> const &nodes, std::ofstream &output,
            std::ofstream &index);

};

#endif /* BUGS_MODEL_H_ */


syntax highlighted by Code2HTML, v. 0.9.1