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

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

    00001
    00002 //
    00003 // Copyright (c) 2002           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Author:                      Paul H. Elliott
    00010 // Organization:        Model-based Embedded and Robotic Systems Group
    00011 //                                      Massachusetts Institute of Technology
    00012 //
    00013 // CCMEReader class
    00014 //
    00016
    00017 #ifndef CCMEREADER_HEADER_FILE
    00018 #define CCMEREADER_HEADER_FILE
    00019
    00020 #include <cstdio>
    00021 #include <vector>
    00022
    00023 #define CCMETextFileType 0x1000
    00024
    00025 namespace Mers {
    00026         namespace Models {
    00027                 namespace Base {
    00028                         class BaseModel;
    00029                 }
    00030         }
    00031         namespace Estimation {
    00032                 namespace Discrete {
    00033                         class Dissent;
    00034                         class CompiledTransition;
    00035
    00036                         namespace CompiledME {
    00037                                 namespace CCMEReader {
    00042                                         class CCMEReader {
    00043                                         public:
    00045                                                 // Enumerated Types
    00047
    00053                                                 enum CCMEFileType {
    00054                                                         CCMEText001 = 0x0001 | CCMETextFileType,
    00055                                                         CCMETextLatest = CCMEText001};
    00056
    00058                                                 // Constructors
    00060
    00064                                                 CCMEReader();
    00065
    00067                                                 // Destructors
    00069
    00073                                                 virtual ~CCMEReader();
    00074
    00076                                                 // Functions
    00078
    00087                                                 int loadCCMEFile(char const * filename, Mers::Models::Base::BaseModel const &model);
    00088
    00095                                                 static char const * ccmeFileTypeToString(CCMEFileType fileType);
    00096
    00102                                                 static bool isTextFileFormat(CCMEFileType fileType);
    00103
    00108                                                 void addDissent(Mers::Estimation::Discrete::Dissent const * dissent);
    00109
    00114                                                 std::vector<Mers::Estimation::Discrete::Dissent const *> const & getDissents() const;
    00115
    00120                                                 void addTransition(Mers::Estimation::Discrete::CompiledTransition const * compiledTransition);
    00121
    00126                                                 std::vector<Mers::Estimation::Discrete::CompiledTransition const *> const & getTransitions() const;
    00127
    00128                                         protected:
    00130                                                 // Functions
    00132
    00139                                                 static char const * getCCMEFileHeader(CCMEFileType fileType);
    00140
    00141
    00143                                                 // Data
    00145
    00147                                                 std::vector<Mers::Estimation::Discrete::Dissent const *> dissents;
    00148
    00150                                                 std::vector<Mers::Estimation::Discrete::CompiledTransition const *> compiledTransitions;
    00151                                         };
    00152                                 }
    00153                         }
    00154                 }
    00155         }
    00156 }
    00157
    00158 #endif //CCMEREADER_HEADER_FILE
    00159