- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Estimation::Discrete::CompiledObject Class Reference

`#include <CompiledObject.h>`

List of all members.

## Public Types
enum | CompiledObjectType { oDissent = 0, oDISSENT = oDissent, oCompiledTransition = 1, oCOMPILEDTRANSITION = oCompiledTransition }
## Public Member Functions
| CompiledObject (const void *obj, const CompiledObjectType theType, unsigned short db=0)
| CompiledObject (CompiledObject const &origCO)
| CompiledObject (CompiledObject const *origCO)
virtual | ~CompiledObject ()
const Dissent * | getDissent (void) const
const CompiledTransition * | getCompiledTransition (void) const
bool | implicantElementSatisfied (const bool isSat)
bool | isEnabled (void) const
void | resetCount (void)
void | setDebug (const unsigned short debugVal)
## Friends
std::ostream & | operator<< (std::ostream &, CompiledObject const &)

## Detailed Description

The compiled object count maintains the count of the number of antecedent elements that have been satisified in order to determine when the object is enabled. The compiled objects supported are dissents and compiled transitions. Since there may be multiple compiled objects pointing to the same dissent or compiled transition, they do not assume ownership.

Definition at line 43 of file CompiledObject.h.

## Member Enumeration Documentation

enum Mers::Estimation::Discrete::CompiledObject::CompiledObjectType

CompiledObjectType is used to distinguish between dissents and compiled transitions

Definition at line 53 of file CompiledObject.h.

## Constructor & Destructor Documentation

CompiledObject::CompiledObject | ( | const void * | obj,
|  | const CompiledObjectType | theType,
|  | unsigned short | db = `0` |
| ) |  |  |

Creates a new compiled object and sets the count to 0

Parameters:

  | obj | pointer to the compiled object
  | theType | is the type of compiled object being represented
  | db | initial value for the debug flag

Definition at line 31 of file CompiledObject.cpp.

CompiledObject::CompiledObject | ( | CompiledObject const & | origCO | ) |

Copy Constructor

Parameters:

  | origCO | reference to the compiled object to copy from

Definition at line 42 of file CompiledObject.cpp.

CompiledObject::CompiledObject | ( | CompiledObject const * | origCO | ) |

Copy Constructor

Parameters:

  | origCO | pointer to the compiled object to copy from

Definition at line 48 of file CompiledObject.cpp.

CompiledObject::~CompiledObject | ( |  | ) | `[virtual]`

Destroys the CompiledObject

Definition at line 58 of file CompiledObject.cpp.

## Member Function Documentation

const Dissent * CompiledObject::getDissent | ( | void |  | ) | const

Gets the dissent. Warns if compiled object is not enabled.

Returns:
  the dissent pointer or NULL if this object is a Compiled Transition

Definition at line 70 of file CompiledObject.cpp.

References isEnabled().

Here is the call graph for this function:

const CompiledTransition * CompiledObject::getCompiledTransition | ( | void |  | ) | const

Gets the compiled transition. Warns if compiled object is not enabled.

Returns:
  the compiled transition pointer or NULL if this object is a dissent

Definition at line 87 of file CompiledObject.cpp.

References isEnabled().

Here is the call graph for this function:

bool CompiledObject::implicantElementSatisfied | ( | const bool | isSat | ) |

Increments or Decrements the count of the number of elements in the implicant that have been satisfied

Parameters:

  | isSat | increments if true, decrements if false

Returns:
  false if count is out of bounds, true otherwise

Definition at line 104 of file CompiledObject.cpp.

bool CompiledObject::isEnabled | ( | void |  | ) | const

Determines if the object is enabled by comparing the satisfied elements count to the number of elements in the antecedent

Returns:
  true if the numbers match, false otherwise

Definition at line 149 of file CompiledObject.cpp.

Referenced by getCompiledTransition(), and getDissent().

void CompiledObject::resetCount | ( | void |  | ) |

Resets the count of the number of elements in the implicant that have been satisfied to zero

Definition at line 159 of file CompiledObject.cpp.

void CompiledObject::setDebug | ( | const unsigned short | debugVal | ) |

Sets the debug flag to the value specified

Parameters:

  | debugVal | the value to set the debug flag to (higher numbers are more output)

Definition at line 168 of file CompiledObject.cpp.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/CompiledObject.h
- /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/CompiledObject.cpp