Federate.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CERTI - HLA RunTime Infrastructure
00003 // Copyright (C) 2002-2005  ONERA
00004 //
00005 // This program is free software ; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation ; either version 2 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY ; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program ; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00018 //
00019 // $Id: Federate.hh,v 3.15 2008/12/07 20:16:11 gotthardp Exp $
00020 // ----------------------------------------------------------------------------
00021 
00022 #ifndef CERTI_RTIG_FEDERATE_HH
00023 #define CERTI_RTIG_FEDERATE_HH
00024 
00025 #include "certi.hh"
00026 #include "Exception.hh"
00027 
00028 #include <vector>
00029 #include <string>
00030 
00031 namespace certi {
00032 namespace rtig {
00033 
00036 class Federate
00037 {
00038 public:
00039     Federate(const char *the_name, FederateHandle) throw (RTIinternalError);
00040 
00041     FederateHandle getHandle() const { return handle ; };
00042     void setHandle(FederateHandle h) { handle = h ; };
00043 
00044     const char *getName() const { return name.c_str(); };
00045     bool isConstrained() const { return constrained ; };
00046     bool isRegulator() const { return regulator ; };
00047     void setConstrained(bool c) { constrained = c ; };
00048     void setRegulator(bool r) { regulator = r ; };
00049 
00056     void setClassRelevanceAdvisorySwitch(bool val) { cras = val ; };
00057 
00064     void setInteractionRelevanceAdvisorySwitch(bool val) { iras = val ; };
00065 
00072     void setAttributeRelevanceAdvisorySwitch(bool val) { aras = val ; };
00073 
00080     void setAttributeScopeAdvisorySwitch(bool val) { asas = val ; };
00081 
00087     bool isClassRelevanceAdvisorySwitch() const { return cras ; };
00088 
00094     bool isInteractionRelevanceAdvisorySwitch() const { return iras ; };
00095 
00101     bool isAttributeRelevanceAdvisorySwitch() const { return aras ; };
00102 
00108     bool isAttributeScopeAdvisorySwitch() const { return asas ; };
00109 
00110     bool isSaving() const { return saving ; };
00111     bool isRestoring() const { return restoring ; };
00112     void setSaving(bool s) { saving = s ; };
00113     void setRestoring(bool r) { restoring = r ; };
00114 
00115     void addSynchronizationLabel(const char *) throw (RTIinternalError);
00116     void removeSynchronizationLabel(const char *) throw (RTIinternalError);
00117     bool isSynchronizationLabel(const char *) const ;
00118 
00119 private:
00120     FederateHandle handle ; 
00121     std::string name ; 
00122 
00125     bool regulator ;
00126     bool constrained ; 
00127 
00128     bool cras ; 
00129     bool iras ; 
00130     bool aras ; 
00131     bool asas ; 
00132 
00133     typedef std::vector<std::string> SyncList ;
00134     SyncList syncLabels ; // List of labels to synchronize.
00135 
00136     bool saving ; 
00137     bool restoring ; 
00138 };
00139 
00140 }} // namespace certi::rtig
00141 
00142 #endif // CERTI_RTIG_FEDERATE_HH
00143 
00144 // $Id: Federate.hh,v 3.15 2008/12/07 20:16:11 gotthardp Exp $

Generated on Thu Apr 30 15:53:48 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5