VariableContainer Class Reference
[SAT Problem]

#include <SatProblem.h>

Collaboration diagram for VariableContainer:

Collaboration graph
[legend]

List of all members.


Detailed Description

Container for variables names.

It can transform variable name to its integral index and vice versa.

Definition at line 43 of file SatProblem.h.


Public Member Functions

 VariableContainer ()
 ~VariableContainer ()
int getLength ()
 
Returns:
Returns count of variables managed by container.

std::string getVarName (int index)
 Read name of variable on desired index.
int addVariable (std::string name)
 Add variable to container, if it wasn't there before.

Classes

struct  Private

Constructor & Destructor Documentation

VariableContainer (  ) 

Definition at line 213 of file SatProblem.cpp.

References VariableContainer::Private::currentIndex.

~VariableContainer (  ) 

Definition at line 218 of file SatProblem.cpp.


Member Function Documentation

int getLength (  ) 

Returns:
Returns count of variables managed by container.

Definition at line 221 of file SatProblem.cpp.

References VariableContainer::Private::currentIndex.

Referenced by SatProblem::getVarsCount(), and SatProblem::Private::parseFile().

string getVarName ( int  index  ) 

Read name of variable on desired index.

Parameters:
index Index of variable should be in range <0, getLength()-1>
Returns:
Returns variable's name as STL string.

Definition at line 224 of file SatProblem.cpp.

References VariableContainer::Private::indexToName.

Referenced by SatProblem::getVarName().

int addVariable ( std::string  name  ) 

Add variable to container, if it wasn't there before.

Parameters:
name Name of variable to add.
Returns:
Return variable's integral index.

Definition at line 228 of file SatProblem.cpp.

References VariableContainer::Private::currentIndex, VariableContainer::Private::indexToName, and VariableContainer::Private::nameToIndex.

Referenced by ScannerStringHandler::readNext().


The documentation for this class was generated from the following files:
Generated on Wed Nov 5 22:30:22 2008 for Fast SAT Solver by  doxygen 1.5.4