00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _CERTI_INTERACTION_SET_HH
00026 #define _CERTI_INTERACTION_SET_HH
00027
00028
00029 #include "certi.hh"
00030 #include "SecurityServer.hh"
00031 #include "Interaction.hh"
00032 #include "TreeNamedAndHandledSet.hh"
00033
00034
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
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
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
00116
00117 void isReady(FederateHandle theFederateHandle,
00118 InteractionClassHandle theInteraction,
00119 std::vector <ParameterHandle> ¶mArray,
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 }
00157
00158 #endif // _CERTI_INTERACTION_SET_HH
00159
00160