⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtiambservices.hh

📁 基于BHRTI开发环境的简单五子棋游戏
💻 HH
📖 第 1 页 / 共 3 页
字号:
// File RTIambServices.hh
// Included in RTI.hh
// Type:    header file
// Description: RTI ambassador services provided by RTI


//                RTI Parameter Passing Memory Conventions
//
// C1  In parameter by value.
// C2  Out parameter by pointer value.
// C3  Function return by value.
// C4  In parameter by const pointer value.  Caller provides memory.
//     Caller may free memory or overwrite it upon completion of
//     the call.  Callee must copy during the call anything it
//     wishes to save beyond completion of the call.  Parameter
//     type must define const accessor methods.
// C5  Out parameter by pointer value.  Caller provides reference to object.
//     Callee constructs an instance on the heap (new) and returns.
//     The caller destroys the instance (delete) at its leisure.
// C6  Function return by pointer value.  Callee constructs an instance on
//     the heap (new) and returns a reference.  The caller destroys the
//     instance (delete) at its leisure.
//

#ifndef _DVE_RTIambServices_HH
#define _DVE_RTIambServices_HH



////////////////////////////////////
// Federation Management Services //
////////////////////////////////////

// 4.2
void createFederationExecution (
  const char *executionName,  // supplied C4
  const char *FED			  // supplied C4      
)
throw (
  FederationExecutionAlreadyExists,
  CouldNotOpenFED,
  ErrorReadingFED,
  ConcurrentAccessAttempted,
  RTIinternalError);

// 4.3
void destroyFederationExecution (
  const char *executionName // supplied C4
)
throw (
  FederatesCurrentlyJoined,
  FederationExecutionDoesNotExist, 
  ConcurrentAccessAttempted,
  RTIinternalError);

// 4.4
FederateHandle                                               // returned C3
joinFederationExecution (
  const char                   *yourName,					 // supplied C4
  const char                   *executionName,				 // supplied C4
  FederateAmbassadorPtr ptr=NULL
)
throw (
  FederateAlreadyExecutionMember,
  FederationExecutionDoesNotExist,
  CouldNotOpenFED,
  ErrorReadingFED,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 4.5
void resignFederationExecution (
  ResignAction theAction) // supplied C1
throw (
  FederateOwnsAttributes,
  FederateNotExecutionMember,
  InvalidResignAction,
  ConcurrentAccessAttempted,
  RTIinternalError);

// 4.6
void registerFederationSynchronizationPoint (     
	const char *label,    // supplied C4
	const char *theTag)   // supplied C4
throw (
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void registerFederationSynchronizationPoint (       
	const char                *label,     // supplied C4
	const char                *theTag,    // supplied C4
	const FederateHandleSet&   syncSet)   // supplied C4      
throw (
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 4.9
void synchronizationPointAchieved ( const char *label ) // supplied C4
throw (
  SynchronizationPointLabelWasNotAnnounced,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 4.11
void requestFederationSave (   
	const char     *label,    // supplied C4
	const FedTime&  theTime) // supplied C4
throw (
  FederationTimeAlreadyPassed, 
  InvalidFederationTime,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void requestFederationSave ( 
	const char *label)     // supplied C4
throw (
    FederateNotExecutionMember,
    ConcurrentAccessAttempted,
    SaveInProgress,
    RestoreInProgress,
    RTIinternalError);

// 4.13
void federateSaveBegun ()
throw (
  SaveNotInitiated,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  RestoreInProgress,
  RTIinternalError);

// 4.14
void federateSaveComplete ()
throw (
  SaveNotInitiated,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  RestoreInProgress,
  RTIinternalError);

void federateSaveNotComplete ()
throw (
  SaveNotInitiated,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  RestoreInProgress,
  RTIinternalError);

// 4.16
void requestFederationRestore ( const char *label) // supplied C4
throw (
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 4.20
void federateRestoreComplete ()
throw (
    RestoreNotRequested,
    FederateNotExecutionMember,
    ConcurrentAccessAttempted,
    SaveInProgress,
    RTIinternalError);

void federateRestoreNotComplete ()
throw (
  RestoreNotRequested,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RTIinternalError);


/////////////////////////////////////
// Declaration Management Services //
/////////////////////////////////////

// 5.2
void publishObjectClass (
        ObjectClassHandle   theClass,                       // supplied C1
  const AttributeHandleSet& attributeList)                  // supplied C4
throw (
  ObjectClassNotDefined,
  AttributeNotDefined,
  OwnershipAcquisitionPending,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.3
void unpublishObjectClass (
  ObjectClassHandle theClass) // supplied C1
throw (
  ObjectClassNotDefined, 
  ObjectClassNotPublished,
  OwnershipAcquisitionPending,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.4
void publishInteractionClass (
  InteractionClassHandle theInteraction)       // supplied C1
throw (
  InteractionClassNotDefined,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.5
void unpublishInteractionClass (
  InteractionClassHandle theInteraction) // supplied C1
throw (
  InteractionClassNotDefined,
  InteractionClassNotPublished,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.6
void subscribeObjectClassAttributes (
        ObjectClassHandle   theClass,                    // supplied C1
  const AttributeHandleSet& attributeList,          	 // supplied C4
        Boolean        active = RTI_TRUE)
throw (
  ObjectClassNotDefined, 
  AttributeNotDefined,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.7
void unsubscribeObjectClass (
  ObjectClassHandle theClass) // supplied C1
throw (
  ObjectClassNotDefined,
  ObjectClassNotSubscribed,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 5.8
void subscribeInteractionClass (
  InteractionClassHandle theClass, // supplied C1
  Boolean           active = RTI_TRUE)
throw (
  InteractionClassNotDefined,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  FederateLoggingServiceCalls,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);


// 5.9
void unsubscribeInteractionClass (
  InteractionClassHandle theClass) // supplied C1
throw (
  InteractionClassNotDefined,
  InteractionClassNotSubscribed,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

////////////////////////////////
// Object Management Services //
////////////////////////////////

// 6.2
ObjectHandle                          // returned C3
registerObjectInstance (
        ObjectClassHandle  theClass,					// supplied C1
  const char           *theObject)					    // supplied C4
throw (
  ObjectClassNotDefined,
  ObjectClassNotPublished,
  ObjectAlreadyRegistered,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);


ObjectHandle                                          // returned c3
registerObjectInstance (
  ObjectClassHandle theClass                          // supplied c1
)
throw (
  ObjectClassNotDefined,
  ObjectClassNotPublished,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.4
EventRetractionHandle
updateAttributeValues (
        ObjectHandle                 theObject,       // supplied C1
  const AttributeHandleValuePairSet& theAttributes,   // supplied C4
  const FedTime&                     theTime,         // supplied c4
  const char                        *theTag)          // supplied C4
throw (
  ObjectNotKnown,
  AttributeNotDefined,
  AttributeNotOwned,
  InvalidFederationTime,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void updateAttributeValues (
        ObjectHandle                 theObject,					   	  // supplied C1
  const AttributeHandleValuePairSet& theAttributes,                   // supplied C4
  const char                        *theTag  = NULL      			  // supplied C4
)
throw (
  ObjectNotKnown,
  AttributeNotDefined,
  AttributeNotOwned,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);



// 6.6
EventRetractionHandle                                 // returned c3
sendInteraction ( 
        InteractionClassHandle       theInteraction,  // supplied c1
  const ParameterHandleValuePairSet& theParameters,   // supplied c4
  const FedTime&                     theTime,         // supplied c4
  const char                        *theTag)          // supplied c4
throw (
  InteractionClassNotDefined,
  InteractionClassNotPublished,
  InteractionParameterNotDefined,
  InvalidFederationTime,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void sendInteraction (
        InteractionClassHandle       theInteraction,                  // supplied C1
  const ParameterHandleValuePairSet& theParameters,                   // supplied C4
  const char                        *theTag = NULL                    // supplied C4
)
throw (
  InteractionClassNotDefined,
  InteractionClassNotPublished,
  InteractionParameterNotDefined,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.8
EventRetractionHandle                  //returned c3
deleteObjectInstance ( 
         ObjectHandle  theObject,	   //supplied c1
  const  FedTime&      theTime,        //supplied c4
  const  char          *theTag)        //supplied c4
throw (
  ObjectNotKnown,
  DeletePrivilegeNotHeld,
  InvalidFederationTime,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void deleteObjectInstance (
        ObjectHandle    theObject     // supplied C1
,  const char           *theTag       // supplied C4
)
throw (
  ObjectNotKnown,
  DeletePrivilegeNotHeld,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.10
void localDeleteObjectInstance ( ObjectHandle theObject)       // supplied C1
throw (
  ObjectNotKnown,
  FederateOwnsAttributes,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.11
void changeAttributeTransportationType (
	ObjectHandle              theObject,      // supplied C1
	const AttributeHandleSet& theAttributes,  // supplied C4
	TransportationHandle      theType)       // supplied C1
throw (
  ObjectNotKnown,
  AttributeNotDefined,
  AttributeNotOwned,
  InvalidTransportationHandle,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.12
void changeInteractionTransportationType (
	InteractionClassHandle theClass,          // supplied C1
	TransportationHandle   theType)          // supplied C1
throw (
  InteractionClassNotDefined,
  InteractionClassNotPublished,
  InvalidTransportationHandle,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

// 6.15
void requestObjectAttributeValueUpdate (
        ObjectHandle        theObject,     // supplied C1
  const AttributeHandleSet& theAttributes) // supplied C4
throw (
  ObjectNotKnown,
  AttributeNotDefined,
  FederateNotExecutionMember,
  ConcurrentAccessAttempted,
  SaveInProgress,
  RestoreInProgress,
  RTIinternalError);

void requestClassAttributeValueUpdate (
		ObjectClassHandle   theClass,      // supplied C1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -