lgrFomWithRegions.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef lgrFomWithRegions_H_
00007 #define lgrFomWithRegions_H_
00008 
00010 
00011 #if DtHLA
00012 
00013 #include "lgrSim.h"
00014 
00015 #include <vl/fom.h>
00016 
00017 namespace MAKLogger
00018 {
00019 
00020 #ifdef DtHLA_1516
00021    class DtLgrDimensionDesc;
00022 #else
00023    class DtLgrSpaceDesc;
00024 #endif
00025 
00027    class DT_DLL_LGRSIM DtLgrFomWithRegions : public DtFom
00028    {
00029    public:
00030       DtLgrFomWithRegions(DtExerciseConn* exConn);
00031       
00032       virtual ~DtLgrFomWithRegions();
00033 
00035       //  builds or if it is called twice with the same name.
00036       virtual void addSpace(const char* name);
00037       
00039       //  builds or if it is called with an unrecognized SpaceName.
00040       virtual void addDimension(const char* SpaceName, const char* dimName);
00041       
00043       //  builds or if it is called twice with the same dimName.
00044       virtual void addDimension(const char* dimName, unsigned long upperBound,
00045          unsigned long defaultLowerBound, unsigned long defaultUpperBound,
00046          bool excluded);
00047       
00049       //  non-null space in HLA 1516 or if it is called with an
00050       //  unrecognized space in HLA 1.3.
00051       virtual void addInterClass(const char* name, 
00052          const char* baseName, DtTransportType transport, 
00053          DtOrderType order, const char* space=NULL);
00054 
00056       virtual bool addInteractionDimension(const char* interactionName,
00057          const char* dimension);
00058 
00060       //  builds with a non-null space or if it is called with an unrecognized
00061       //  space in HLA 1.3.
00062       virtual void addAttribute(const char* className, 
00063          const char* attrName, DtTransportType transport, 
00064          DtOrderType order, const char* space=NULL);
00065       
00067       virtual bool addAttributeDimension(const char* className,
00068          const char* attrName, const char* dimName);
00069 
00070 #ifdef DtHLA_1516
00071       virtual const DtLgrDimensionDesc *dimensionByName(const DtString &dimName) const;
00072 
00073       virtual std::set<const DtLgrDimensionDesc *> attributeDimensionsByClassAndAttributeName(
00074          const DtObjClassDesc &objClass, const DtString &attrName) const;
00075 
00076       virtual std::set<const DtLgrDimensionDesc *> interactionDimensionsByClass(
00077          const DtInterClassDesc &interClass) const;
00078 #else
00079       virtual const DtLgrSpaceDesc *spaceByName(const DtString &spaceName) const;
00080 
00081       virtual const DtLgrSpaceDesc *attributeSpaceByClassAndAttributeName(
00082          const DtObjClassDesc &objClass, const DtString &attrName, bool searchAncesestors=false) const;
00083 
00084       virtual const DtLgrSpaceDesc *interactionSpaceByClass(const DtInterClassDesc &interClass) const;
00085 #endif
00086 
00087    private:
00089       //  in principle, foms could be copied, but they contain a reference to the
00090       //  DtExerciseConn, so doing so would be of dubious validity and usefulness
00091       DtLgrFomWithRegions(const DtLgrFomWithRegions &from);
00093       DtLgrFomWithRegions &operator=(DtLgrFomWithRegions &rhs);
00094 
00095    protected:
00096 #ifdef DtHLA_1516
00097       std::map<DtString, DtLgrDimensionDesc *> myDimensionsByName;
00098       std::map<const DtObjClassDesc *, std::map<DtString, std::set<const DtLgrDimensionDesc *> > > myClassToAttrToDimensions;
00099       std::map<const DtInterClassDesc *, std::set<const DtLgrDimensionDesc *> > myInterClassToDimensions;
00100 #else
00101       std::map<DtString, DtLgrSpaceDesc *> mySpacesByName;
00102       std::map<const DtObjClassDesc *, std::map<DtString, DtLgrSpaceDesc *> > myClassToAttrToSpace;
00103       std::map<const DtInterClassDesc *, DtLgrSpaceDesc *> myInterClassToSpace;
00104 #endif
00105    };
00106 
00107 }
00108 
00109 #endif
00110 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)