Generator Class Reference

#include <Generator.h>

List of all members.

Public Member Functions

 Generator (void)
 Generator Constructor.
 ~Generator (void)
 Generator Destructor.
void cchain (const string &, const string &, const bool &, const bool &)
void egen (const string &, const string &, const bool &)
void cchainToTables (const string &, const string &)
void set_tablesPath (const string &)
void printNodesList (string &, string &, string &)
string get_tablesPath ()

Private Member Functions

int getWord (FILE *, char *, int &, string &, char, bool)
int find_id (const string &)
string find_name (const int &)
void print_gnodes (void)
void show_tables (void)
bool read_gnodes (const string &)
bool read_tables (const bool &)
void err_exit (void)
vector< string > get_states (GNode &, const bool &)
string get_function (GNode &)
bool is_gnode (const string &)
int num_1 (GNode &)
int num_lines (void)
int num_0 (GNode &)
void decToBin (int, string &)

Private Attributes

list< GNodegnodes
string tablesPath
list< Inputcontrol_inputs

Friends

class GNode

Detailed Description

Generator is a utility that converts input files for ChemChains


Constructor & Destructor Documentation

Generator::Generator ( void   )  [inline]

Generator Constructor.

Generator::~Generator ( void   )  [inline]

Generator Destructor.


Member Function Documentation

void Generator::cchain ( const string &  in,
const string &  out,
const bool &  rand_init,
const bool &  rand_fc 
)

Mode to create input file for ChemChain

void Generator::cchainToTables ( const string &  in,
const string &  out 
)

Creates csv logic tables based on the network information in the infile

void Generator::decToBin ( int  dec,
string &  bin 
) [private]

Converts decimal to binary

void Generator::egen ( const string &  in,
const string &  out,
const bool &  rand_fc 
)

Mode to generate a file with logic for the eq. generator

void Generator::err_exit ( void   )  [private]

Exits the program

int Generator::find_id ( const string &  name  )  [private]

returns the id of node name

string Generator::find_name ( const int &   )  [private]
string Generator::get_function ( GNode n  )  [private]

Retrieves the logic of a node

vector< string > Generator::get_states ( GNode n,
const bool &  val 
) [private]

Gets states of a node when the function = 1 or 0

string Generator::get_tablesPath (  ) 

returns tablesPath

int Generator::getWord ( FILE *  in,
char *  buf,
int &  index,
string &  str,
char  tok,
bool  alphaOnly 
) [private]
bool Generator::is_gnode ( const string &  name  )  [private]

Returns true if there is a Gnode name

int Generator::num_0 ( GNode n  )  [private]

counts the number of 0's in a node

int Generator::num_1 ( GNode n  )  [private]

Counts the number of 1's in a node

int Generator::num_lines ( void   )  [private]

Counts the number of lines of overall logic

void Generator::print_gnodes ( void   )  [private]

Prints out the nodes

void Generator::printNodesList ( string &  specs,
string &  logic,
string &  out 
)

This function takes in network specs and logic and creates a list of nodes

bool Generator::read_gnodes ( const string &  in_file  )  [private]

Read in the list of nodes from the input file

bool Generator::read_tables ( const bool &  rand_fc  )  [private]

Read in the truth tables for each node

void Generator::set_tablesPath ( const string &  path  ) 

set tablesPath equal to path

void Generator::show_tables ( void   )  [private]

Prints out the tables


Friends And Related Function Documentation

friend class GNode [friend]

Member Data Documentation

list<GNode> Generator::gnodes [private]
string Generator::tablesPath [private]

The documentation for this class was generated from the following files:

Generated on Fri May 7 00:40:42 2010 for ChemChains by  doxygen 1.6.1