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

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

    00001 //=============================================================================
    00002 // CompiledObject.h: interface for the CompiledObject class.
    00003 //
    00004 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00005 // All Rights Reserved          Massachusetts Institute of Technology
    00006 //
    00007 // This software is provided as is. Model-based Embedded and Robotic Systems
    00008 // (MERS) group does not assume any responsibility.
    00009 //
    00010 // Author:                      Oliver B. Martin
    00011 // Organization:        Model-based Embedded and Robotic Systems Group
    00012 //                                      Massachusetts Institute of Technology
    00013 //
    00014 // The compiled object count maintains the count of the number of antecedent
    00015 //  elements that have been satisified in order to determine when the object
    00016 //  is enabled.
    00017 //
    00018 //=============================================================================
    00019
    00020 #if !defined(_COMPILEDOBJECT_H_)
    00021 #define _COMPILEDOBJECT_H_
    00022
    00023 #if _MSC_VER > 1000
    00024 #pragma once
    00025 #endif // _MSC_VER > 1000
    00026
    00027 #include <iostream>
    00028
    00029 namespace Mers {
    00030         namespace Estimation {
    00031                 namespace Discrete {
    00032
    00033                         class Dissent;
    00034                         class CompiledTransition;
    00035
    00043                         class CompiledObject
    00044                         {
    00045
    00046                                 friend std::ostream & operator<<(std::ostream &, CompiledObject const &);
    00047
    00048                         public:
    00053                                 enum CompiledObjectType { oDissent = 0, oDISSENT = oDissent,
    00054                                         oCompiledTransition = 1, oCOMPILEDTRANSITION = oCompiledTransition };
    00055
    00056                                 //-----------------------------------------
    00057                                 // Constructors
    00058                                 //-----------------------------------------
    00059
    00066                                 CompiledObject(const void * obj, const CompiledObjectType theType,
    00067                                         unsigned short db = 0);
    00068
    00069
    00070                                 //-----------------------------------------
    00071                                 // Copy Constructors
    00072                                 //-----------------------------------------
    00073
    00078                                 CompiledObject(CompiledObject const & origCO);
    00079
    00084                                 CompiledObject(CompiledObject const * origCO);
    00085
    00086                                 //-----------------------------------------
    00087                                 // Destructors
    00088                                 //-----------------------------------------
    00089
    00093                                 virtual ~CompiledObject();
    00094
    00095
    00096                                 //-----------------------------------------
    00097                                 // Functions
    00098                                 //-----------------------------------------
    00099
    00104                                 const Dissent * getDissent(void) const;
    00105
    00110                                 const CompiledTransition * getCompiledTransition(void) const;
    00111
    00118                                 bool implicantElementSatisfied(const bool isSat);
    00119
    00120
    00126                                 bool isEnabled(void) const;
    00127
    00132                                 void resetCount(void);
    00133
    00139                                 void setDebug(const unsigned short debugVal);
    00140
    00141
    00142                         private:
    00143
    00149                                 const int getAntecedentLength(void) const;
    00150
    00151
    00152                                 //-----------------------------------------
    00153                                 // Data Members
    00154                                 //-----------------------------------------
    00155
    00156
    00159                                 const void *                            compiledObjectPtr;
    00160
    00162                                 const CompiledObjectType        theObjectType;
    00163
    00165                                 short                                           numElementsSatisfied;
    00166
    00168                                 unsigned short                          debug;
    00169                         };
    00170                 }
    00171         }
    00172 }
    00173
    00174 #endif // !defined(_COMPILEDOBJECT_H_)