InteractionSet.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CERTI - HLA RunTime Infrastructure
00003 // Copyright (C) 2002, 2003, 2005  ONERA
00004 //
00005 // This file is part of CERTI-libCERTI
00006 //
00007 // CERTI-libCERTI is free software ; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public License
00009 // as published by the Free Software Foundation ; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // CERTI-libCERTI is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY ; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015 // Lesser General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this program ; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020 // USA
00021 //
00022 // $Id: InteractionSet.hh,v 3.24 2008/11/08 11:08:03 erk Exp $
00023 // ----------------------------------------------------------------------------
00024 
00025 #ifndef _CERTI_INTERACTION_SET_HH
00026 #define _CERTI_INTERACTION_SET_HH
00027 
00028 // CERTI headers
00029 #include "certi.hh"
00030 #include "SecurityServer.hh"
00031 #include "Interaction.hh"
00032 #include "TreeNamedAndHandledSet.hh"
00033 
00034 // System headers
00035 #include <string>
00036 #include <map>
00037 
00038 namespace certi {
00039 
00040 class CERTI_EXPORT InteractionSet : public TreeNamedAndHandledSet<Interaction>
00041 {
00042 
00043 public:
00044     InteractionSet(SecurityServer *the_server, bool isRootClassSet=false);
00045     ~InteractionSet();
00046 
00053     void addClass(Interaction *theClass, Interaction *parentClass);
00054 
00055     // --------------------------
00056     // -- RTI Support Services --
00057     // --------------------------
00058 
00064     InteractionClassHandle
00065     getInteractionClassHandle(const std::string& class_name) const
00066     throw (NameNotFound);
00067 
00073     std::string
00074     getInteractionClassName(InteractionClassHandle the_handle) const
00075     throw (InteractionClassNotDefined);
00076 
00077     ParameterHandle
00078     getParameterHandle(const char *the_name,
00079             InteractionClassHandle the_class)
00080     throw (NameNotFound,
00081             InteractionClassNotDefined,
00082             RTIinternalError);
00083 
00084     const std::string&
00085     getParameterName(ParameterHandle the_handle,
00086             InteractionClassHandle the_class)
00087     throw (InteractionParameterNotDefined,
00088             InteractionClassNotDefined,
00089             RTIinternalError);
00090 
00091     void killFederate(FederateHandle the_federate)
00092     throw ();
00093 
00094     // ----------------------------------
00095     // -- Interaction Class Management --
00096     // ----------------------------------
00097     void publish(FederateHandle the_federate_handle,
00098             InteractionClassHandle the_interaction_handle,
00099             bool publish)
00100     throw (FederateNotPublishing,
00101             InteractionClassNotDefined,
00102             RTIinternalError,
00103             SecurityError);
00104 
00105     void subscribe(FederateHandle the_federate_handle,
00106             InteractionClassHandle the_interaction_handle,
00107             const RTIRegion *,
00108             bool subscribe)
00109     throw (FederateNotSubscribing,
00110             InteractionClassNotDefined,
00111             RTIinternalError,
00112             SecurityError);
00113 
00114     // -------------------------------------
00115     // -- Interaction Instance Management --
00116     // -------------------------------------
00117     void isReady(FederateHandle theFederateHandle,
00118             InteractionClassHandle theInteraction,
00119             std::vector <ParameterHandle> &paramArray,
00120             UShort paramArraySize)
00121     throw (FederateNotPublishing,
00122             InteractionClassNotDefined,
00123             InteractionParameterNotDefined,
00124             RTIinternalError);
00125 
00126     void broadcastInteraction(FederateHandle theFederateHandle,
00127             InteractionClassHandle theInteractionHandle,
00128             std::vector <ParameterHandle> &theParameterList,
00129             std::vector <ParameterValue_t> &theValueList,
00130             UShort theListSize,
00131             FederationTime theTime,
00132             const RTIRegion *,
00133             const char *theTag)
00134     throw (FederateNotPublishing,
00135             InteractionClassNotDefined,
00136             InteractionParameterNotDefined,
00137             RTIinternalError);
00138 
00139     void broadcastInteraction(FederateHandle theFederateHandle,
00140             InteractionClassHandle theInteractionHandle,
00141             std::vector <ParameterHandle> &theParameterList,
00142             std::vector <ParameterValue_t> &theValueList,
00143             UShort theListSize,
00144             const RTIRegion *,
00145             const char *theTag)
00146     throw (FederateNotPublishing,
00147             InteractionClassNotDefined,
00148             InteractionParameterNotDefined,
00149             RTIinternalError);
00150 
00151 private:
00152 
00153     SecurityServer *server ;
00154 };
00155 
00156 } // namespace certi
00157 
00158 #endif // _CERTI_INTERACTION_SET_HH
00159 
00160 // $Id: InteractionSet.hh,v 3.24 2008/11/08 11:08:03 erk Exp $

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