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

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

# Mers::Utils::Lang::BaseModelObject Class Reference

`#include <BaseModelObject.h>`

Inheritance diagram for Mers::Utils::Lang::BaseModelObject:

[legend]
List of all members.

## Public Types
enum | ObjectType { BMAssignment = 0, BMClause = 1, BMSentence = 2, BMDomain = 3, BMVariable = 4, BMValue = 5, BMDynamicArray = 6, BMModel = 7, oHCAAutomaton = 8, oHCATimeConstraint = 9, oHCATransition = 10, oMarkedAutomaton = 11, oHCAFunctionCall = 12, oGIState = 13, oGIEntry = 14, oGoalInterpreter = 15, oString = 16, oRTAPIMessage = 17, oCommandCallback = 18, oCCAAutomaton = 19, oCCAState = 20, oCCATransition = 21, oHaDMoReDependencyHyperedge = 22, oHaDMoReDependencyNode = 23, oDispatcherPair = 24, Unknown = -1, BMAssignment = 0, BMClause = 1, BMSentence = 2, BMDomain = 3, BMVariable = 4, BMValue = 5, BMVector = 6, BMModel = 7, oHCAAutomaton = 8, oHCATimeConstraint = 9, oHCATransition = 10, oMarkedAutomaton = 11, oHCAFunctionCall = 12, oGIState = 13, oGIEntry = 14, oGoalInterpreter = 15, oString = 16, oRTAPIMessage = 17, oCommandCallback = 18, oCCAAutomaton = 19, oCCAState = 20, oCCATransition = 21, oHaDMoReDependencyHyperedge = 22, oHaDMoReDependencyNode = 23, oDispatcherPair = 24 }
## Public Member Functions
| BaseModelObject (ObjectType myType)
| BaseModelObject (BaseModelObject const &other)
virtual | ~BaseModelObject ()
ObjectType | getObjectType () const
virtual BaseModelObject * | duplicate () const
virtual void | print (std::ostream &out) const =0
## Static Public Member Functions
static char const * | objectTypeToString (ObjectType objType)
## Protected Attributes
ObjectType const | objectType
| the generic object type
## Friends
std::ostream & | operator<< (std::ostream &out, BaseModelObject const &other)
std::ostream & | operator<< (std::ostream &out, BaseModelObject const *other)

## Detailed Description

Basic class that defines the type of the derived class as well as the printing capabilities of all derived classes.

Author:
  Paul H. Elliott

Definition at line 73 of file BaseModelObject.h.

## Member Enumeration Documentation

enum Mers::Utils::Lang::BaseModelObject::ObjectType

The types of all classes that inherit from BaseModelObject. These should be explicitly numbered so they can be written to a file and be loaded again as the right types, should more be added later. Also note that you should use a name other than the class name here otherwise you can't refer to the class name (So BM or o)

##########
## NOTE ##
##########

If you add a type, add it to the objectTypeToString() function as well.

Definition at line 91 of file BaseModelObject.h.

## Constructor & Destructor Documentation

BaseModelObject::BaseModelObject | ( | ObjectType | myType | ) |

Basic constructor

Parameters:

  | myType | the object type to set this object to

Definition at line 26 of file BaseModelObject.cpp.

Referenced by Mers::Utils::Containers::ObjectQueue::deleteElement(), Mers::Utils::Containers::ObjectQueue::newElement(), and Mers::Utils::Containers::ObjectQueue::printElement().

BaseModelObject::BaseModelObject | ( | BaseModelObject const & | other | ) |

Creates the new BaseModelObject by copying the contents of the other BaseModelObject.

Parameters:

  | other | the object will be copied to this new object

Definition at line 32 of file BaseModelObject.cpp.

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

Basic destructor

Definition at line 39 of file BaseModelObject.cpp.

## Member Function Documentation

char const * BaseModelObject::objectTypeToString | ( | ObjectType | objType | ) | `[static]`

Returns the string representation of the object type

Parameters:

  | objType | the ObjectType that is being converted into a string

Returns:
  the string equivalent of the ObjectType enumerated type

Definition at line 46 of file BaseModelObject.cpp.

BaseModelObject::ObjectType BaseModelObject::getObjectType | ( |  | ) | const

Returns the generic BaseModel Object Type of this object

Returns:
  the ObjectType of this object

Definition at line 108 of file BaseModelObject.cpp.

References objectType.

Referenced by Mers::Utils::Containers::ObjectQueue::newElement().

BaseModelObject * BaseModelObject::duplicate | ( |  | ) | const`[virtual]`

Returns a copy of this object if the object can be copied or NULL if the object cannot be copied. This function returns NULL by default, overide this function to return something different.

Returns:
  a pointer to a copy of this object or NULL if it can't be copied

Reimplemented in Mers::Executives::DeductiveController::Command::CommandDispatcherEntry, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClause, and Mers::Utils::Lang::String.

Definition at line 115 of file BaseModelObject.cpp.

virtual void Mers::Utils::Lang::BaseModelObject::print | ( | std::ostream & | out | ) | const`[pure virtual]`

Called to print this object to the specified ostream. Derived classes must define this.

Parameters:

  | out | the ostream to print this object information to

Implemented in Mers::Executives::DeductiveController::Command::DispatcherPair, Mers::Executives::DeductiveController::Command::CommandDispatcherEntry, Mers::Executives::DeductiveController::Rtapi::CommandCallback, Mers::Executives::DeductiveController::Rtapi::RTAPIMessage, Mers::Models::Base::BaseModel, Mers::Models::Base::BaseModelAssignment, Mers::Models::Base::BaseModelClause, Mers::Models::Base::BaseModelDomain, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelDoubleValue, Mers::Models::Base::BaseModelIntegerDomain, Mers::Models::Base::BaseModelSentence, Mers::Models::Base::BaseModelStringDomain, Mers::Models::Base::BaseModelValue, Mers::Models::Base::BaseModelVariable, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCAAutomaton, Mers::Models::CCA::CCAModel, Mers::Models::CCA::CCAState, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransition, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Solvers::Entailment::GI::GoalInterpreter, Mers::Solvers::Entailment::GoalInterpreterInterface, DependencyHyperedge, DependencyNode, Mers::Utils::Containers::DynamicArray, Mers::Utils::Containers::IntegerArray, and Mers::Utils::Lang::String.

Referenced by Mers::Utils::Lang::operator<<().

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | out,
|  | BaseModelObject const & | other |
| ) |  |  | `[friend]`

Prints out this object to the ostream out by calling its print() routine.

Parameters:

  | out | the ostream being written to
  | other | the BaseModelObject being printed

Returns:
  the out ostream

Definition at line 128 of file BaseModelObject.cpp.

std::ostream& operator<< | ( | std::ostream & | out,
|  | BaseModelObject const * | other |
| ) |  |  | `[friend]`

Prints out this object to the ostream out by calling its print() routine

Parameters:

  | out | the ostream being written to
  | other | the BaseModelObject being printed

Returns:
  the out ostream

Definition at line 139 of file BaseModelObject.cpp.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Lang/BaseModelObject.h
- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Lang/BaseModelObject.cpp