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

# /Users/fpy/titan-1-5-MBARI/Mers/Models/Base/Io/SaveLoad/ReferenceSerializer.h

    00001
    00002 //
    00003 // Copyright (c) 2006           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 //
    00010
    00011 #ifndef MERS_MODELS_BASE_IO_SAVELOAD_REFERENCESERIALIZER_H
    00012 #define MERS_MODELS_BASE_IO_SAVELOAD_REFERENCESERIALIZER_H
    00013
    00015
    00016 // For NULL
    00017 #include <cstddef>
    00018
    00020
    00021 namespace Mers {
    00022 namespace Utils {
    00023 namespace Io {
    00024 namespace SaveLoad {
    00025 // Forward Declare ISaveLoad
    00026 class ISaveLoad;
    00027 } // SaveLoad
    00028 } // Io
    00029 } // Utils
    00030
    00031 // In ::Mers::
    00032 namespace Models {
    00033 namespace Base {
    00034
    00035 // Forward Declare Base Model Objects
    00036 class BaseModel;
    00037 class BaseModelValue;
    00038 class BaseModelValueArray;
    00039 class BaseModelDomain;
    00040 class BaseModelDomainArray;
    00041 class BaseModelVariable;
    00042 class BaseModelVariableArray;
    00043 class BaseModelVariableArrayArray;
    00044 class BaseModelAssignment;
    00045 class BaseModelAssignmentArray;
    00046 class BaseModelClause;
    00047 class BaseModelClauseArray;
    00048 class BaseModelSentence;
    00049
    00050 // In ::Mers::Models::Base::
    00051 namespace Io {
    00052 namespace SaveLoad {
    00053
    00055
    00056 // Make a short namespace for BaseModel and SaveLoad namespaces
    00057 namespace ns_SaveLoad = Mers::Utils::Io::SaveLoad;
    00058 namespace ns_BaseModel = Mers::Models::Base;
    00059
    00061
    00067 class ReferenceSerializer {
    00068 public:
    00072         ReferenceSerializer( ns_BaseModel::BaseModel * model = NULL );
    00073
    00077         static const char *
    00078                 getTypeName( const ns_BaseModel::BaseModelVariable * var);
    00079
    00083         void saveLoad( ns_SaveLoad::ISaveLoad * sl, const char * name,
    00084                 const ns_BaseModel::BaseModelVariable * &var );
    00085
    00089         void saveLoad( ns_SaveLoad::ISaveLoad * sl, const char * objName,
    00090                 ns_BaseModel::BaseModelVariable * &var );
    00091
    00092 protected:
    00094         ns_BaseModel::BaseModel * m_model;
    00095 };
    00096
    00098
    00099 } // SaveLoad
    00100 } // Io
    00101 } // Base
    00102 } // Models
    00103 } // Mers
    00104
    00106
    00107 #endif
    00108
    00110