MAK RTIspy API Documentation for HLA Evolved
federationListXmlBlock.h
Go to the documentation of this file.
00001 /*********************************************************************
00002  ** Copyright (c) 2006 MaK Technologies, Inc.
00003  ** All rights reserved.
00004  *********************************************************************/
00005 /*******************************************************************************
00006  ** $RCSfile: federationListXmlBlock.h,v $ $Revision: 1.6 $ $State: Exp $
00007  *******************************************************************************/
00008 #ifndef DtFederationListXmlBlock_H_
00009 #define DtFederationListXmlBlock_H_
00010 
00011 #include <rtiMsConfig.h>
00012 #include "spyXmlBlock.h"
00013 #include <mtl/env.h>
00014 
00015 #include "federationStateXmlBlock.h"
00016 //#include "syncPointXmlBlock.h"
00017 #include <vlutil/vlString.h>
00018 #include <vlutil/vlFilename.h>
00019 #include <vlutil/vlSmartPointers.h>
00020 
00021 #include <iosfwd>
00022 #include <map>
00023 
00024 // Define the XML tags used by this block
00025 DtDECLARE_SPY_XML_TAG( DtFederationListXmlTag );
00026 DtDECLARE_SPY_XML_TAG( DtFederationCountXmlTag );
00027 DtDECLARE_SPY_XML_TAG( DtSelectedFederationXmlTag );
00028 DtDECLARE_SPY_XML_TAG( DtFederateListXmlTag );
00029 DtDECLARE_SPY_XML_TAG( DtSyncPointListXmlTag );
00030 
00031 class DtFederationListXmlBlock;
00032 typedef DtBoost::shared_ptr<DtFederationListXmlBlock> DtFederationListXmlBlockSP;
00033 typedef DtBoost::weak_ptr<DtFederationListXmlBlock>   DtFederationListXmlBlockWP;
00034 
00035 // The DtFederationListXmlBlock holds the list of active federations
00036 class DT_DLL_WWW DtFederationListXmlBlock : public DtSpyXmlBlock
00037 {
00038 public:
00039    typedef std::set< DtFederationStateXmlBlockSP > FederationStateXmlBlockSet;
00040 
00041    static DtSpyXmlBlockSP create( DtNodeAndParentPair xmlNodeAndParent );
00042 
00043 public:
00044    DtFederationListXmlBlock( DtEnvValueSP existingNode, DtEnvValueSP root );
00045    DtFederationListXmlBlock( unsigned int count, const DtString& selectedFederation,
00046                              DtEnvValueSP root );
00047    virtual ~DtFederationListXmlBlock();
00048 
00049    // Add and Remove federations from the list
00050    virtual DtFederationStateXmlBlockSP addFederation( const DtString& name, unsigned int handle, 
00051       const DtString& fedFile, unsigned int numFederates);
00052    virtual DtFederationStateXmlBlockSP removeFederation( const DtString& name );
00053    virtual void removeFederation( DtFederationStateXmlBlockSP federationSP );
00054 
00055    // List the federations
00056    virtual FederationStateXmlBlockSet federations();
00057 
00058 protected:
00059 
00060 
00061    DtSpyXmlBlockElement< unsigned int, false > myCount; 
00062    DtSpyXmlBlockElement< DtString, false >  mySelectedFederation;
00063 };
00064 
00065 #endif // DtFederationListXmlBlock_H_
00066 

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)