MAK RTIspy API Documentation for HLA 1.3
fomStateXmlBlock.h
Go to the documentation of this file.
00001 /*********************************************************************
00002  ** Copyright (c) 2006 MaK Technologies, Inc.
00003  ** All rights reserved.
00004  *********************************************************************/
00005 /*******************************************************************************
00006  ** $RCSfile: fomStateXmlBlock.h,v $ $Revision: 1.6 $ $State: Exp $
00007  ******************************************************************************/
00008 #ifndef DtFomStateXmlBlock_H_
00009 #define DtFomStateXmlBlock_H_
00010 
00011 #include <rtiMsConfig.h>
00012 #include "spyXmlBlock.h"
00013 #include <mtl/env.h>
00014 #include "webSpyUtils.h"
00015 #include "fomObjectXmlBlock.h"
00016 #include "fomInteractionXmlBlock.h"
00017 #include <fomMgr.h>
00018 #include <objClassInfo.h>
00019 #include <intClassInfo.h>
00020 
00021 #include <vlutil/vlFedTarget.h>
00022 #include <vlutil/vlString.h>
00023 #include <vlutil/vlFilename.h>
00024 #include <vlutil/vlSmartPointers.h>
00025 
00026 #include <iosfwd>
00027 #include <map>
00028 
00029 // Define the XML tags used by this block
00030 DtDECLARE_SPY_XML_TAG( DtFomStateXmlTag );
00031                       
00032 class DtFomStateXmlBlock;
00033 typedef DtBoost::shared_ptr<DtFomStateXmlBlock> DtFomStateXmlBlockSP;
00034 typedef DtBoost::weak_ptr<DtFomStateXmlBlock>   DtFomStateXmlBlockWP;
00035 
00036 
00037 // The DtFomStateXmlBlock holds a complete WWW request message
00038 class DT_DLL_WWW DtFomStateXmlBlock : public DtSpyXmlBlock
00039 {
00040 public:
00041    typedef std::set< DtFomObjectXmlBlockSP > FomStateObjectXmlBlockSet;
00042    typedef std::set< DtFomInteractionXmlBlockSP > FomStateInteractionXmlBlockSet;
00043 
00044    static DtSpyXmlBlockSP create( DtNodeAndParentPair xmlNodeAndParent );
00045 
00046 public:
00047    DtFomStateXmlBlock( DtEnvValueSP existingNode, DtEnvValueSP root );
00048    DtFomStateXmlBlock( DtEnvValueSP root );
00049    virtual ~DtFomStateXmlBlock();
00050 
00051    // Load objects and interactions from an existing fom manager
00052    virtual void setFom(const DtFomClassMgr& fom);   
00053 
00054    // Add and Remove objects from the list
00055    virtual DtFomObjectXmlBlockSP addObject( const DtString& name, unsigned long handle );
00056    virtual DtFomObjectXmlBlockSP removeObject( const DtString& name );
00057    virtual void removeObject( DtFomObjectXmlBlockSP objectSP );
00058 
00059    // List the object classes
00060    virtual FomStateObjectXmlBlockSet objects();
00061 
00062    // Add and Remove interactions from the list
00063    virtual DtFomInteractionXmlBlockSP addInteraction( const DtString& name, unsigned long handle, DtTransportType transport, DtOrderType order );
00064    virtual DtFomInteractionXmlBlockSP removeInteraction( const DtString& name );
00065    virtual void removeInteraction( DtFomInteractionXmlBlockSP objectSP );
00066 
00067    // List the interaction classes
00068    virtual FomStateInteractionXmlBlockSet interactions();
00069 
00070 protected:
00071    
00072    // Add sub-classes from existing class infos
00073    void initObjects( const DtObjectClassInfo* fomParent, DtFomObjectXmlBlockSP xmlParent );
00074    void initInteractions( const DtInteractionClassInfo* fomParent, DtFomInteractionXmlBlockSP xmlParent );
00075 };
00076 
00077 
00078 #endif // DtFomStateXmlBlock_H_
00079 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)