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

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

# Mers::Estimation::Discrete::CompiledME::CCMEReader::CCMEReader Class Reference

`#include <CCMEReader.h>`

List of all members.

## Public Types
enum | CCMEFileType { CCMEText001 = 0x0001 | CCMETextFileType, CCMETextLatest = CCMEText001 }
## Public Member Functions
| CCMEReader ()
virtual | ~CCMEReader ()
int | loadCCMEFile (char const *filename, Mers::Models::Base::BaseModel const &model)
void | addDissent (Mers::Estimation::Discrete::Dissent const *dissent)
std::vector< Mers::Estimation::Discrete::Dissent const * > const & | getDissents () const
void | addTransition (Mers::Estimation::Discrete::CompiledTransition const *compiledTransition)
std::vector< Mers::Estimation::Discrete::CompiledTransition const * > const & | getTransitions () const
## Static Public Member Functions
static char const * | ccmeFileTypeToString (CCMEFileType fileType)
static bool | isTextFileFormat (CCMEFileType fileType)
## Static Protected Member Functions
static char const * | getCCMEFileHeader (CCMEFileType fileType)
## Protected Attributes
std::vector< Mers::Estimation::Discrete::Dissent const * > | dissents
| An array of all the dissents that have been loaded.
std::vector< Mers::Estimation::Discrete::CompiledTransition const * > | compiledTransitions
| An array of all the transitions that have been loaded.

## Detailed Description

Handles reading CCME files. It uses a BaseModel object to ground the symbols.

Definition at line 42 of file CCMEReader.h.

## Member Enumeration Documentation

enum Mers::Estimation::Discrete::CompiledME::CCMEReader::CCMEReader::CCMEFileType

CCMEFileType is setup so the version # is the lower 12 bits and the 13th bit is set to 1 if this is a text format, or 0 if it's a binary format

Definition at line 53 of file CCMEReader.h.

## Constructor & Destructor Documentation

CCMEReader::CCMEReader | ( |  | ) |

Creates a new CCME Reader.

Definition at line 41 of file CCMEReader.cpp.

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

Destroys this object.

Definition at line 47 of file CCMEReader.cpp.

## Member Function Documentation

int CCMEReader::loadCCMEFile | ( | char const * | filename,
|  | Mers::Models::Base::BaseModel const & | model |
| ) |  |  |

loads the file specified by filename into this reader.

Parameters:

  | filename | pointer to the string name of the file being opened
  | model | handle to the model object that defines the variables and values present in the CCME file.

Returns:
  0 on success or non zero if an error occured with opening or parsing the file.

Definition at line 53 of file CCMEReader.cpp.

char const * CCMEReader::ccmeFileTypeToString | ( | CCMEFileType | fileType | ) | `[static]`

returns the string name of a CCMEFileType enumerated type

Parameters:

  | fileType | the enumerated type for which the string is being fetched

Returns:
  a handle to a static string if the enumerated type was found or NULL if the type was invalid

Definition at line 83 of file CCMEReader.cpp.

bool CCMEReader::isTextFileFormat | ( | CCMEFileType | fileType | ) | `[static]`

returns true iff this is a CCME text file type

Parameters:

  | fileType | the file type in question

Returns:
  true if the CCMEFileType is text file type

Definition at line 95 of file CCMEReader.cpp.

void CCMEReader::addDissent | ( | Mers::Estimation::Discrete::Dissent const * | dissent | ) |

Adds a new Dissent to this object.

Parameters:

  | dissent | The new dissent to add to this object.

Definition at line 102 of file CCMEReader.cpp.

References dissents.

vector< Dissent const * > const & CCMEReader::getDissents | ( |  | ) | const

Retrieves the set of dissents loaded.

Returns:
  the list of all dissents loaded from the file.

Definition at line 111 of file CCMEReader.cpp.

References dissents.

void CCMEReader::addTransition | ( | Mers::Estimation::Discrete::CompiledTransition const * | compiledTransition | ) |

Adds a new CompiledTransition to this object.

Parameters:

  | compiledTransition | The new transition to add to this object.

Definition at line 118 of file CCMEReader.cpp.

References compiledTransitions.

vector< CompiledTransition const * > const & CCMEReader::getTransitions | ( |  | ) | const

Retrieves the set of compiled transitions loaded.

Returns:
  the list of all compiled transitions loaded from the file.

Definition at line 127 of file CCMEReader.cpp.

References compiledTransitions.

char const * CCMEReader::getCCMEFileHeader | ( | CCMEFileType | fileType | ) | `[static, protected]`

returns the header string for the specified fileType

Parameters:

  | fileType | the file for which the file header is retrieved

Returns:
  a valid static character string if the header was found or NULL if the header was not found

Definition at line 134 of file CCMEReader.cpp.

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

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