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

📄 objectmanagement.cc

📁 分布式仿真 开放源码
💻 CC
📖 第 1 页 / 共 2 页
字号:
// ----------------------------------------------------------------------------//! removeObjectvoidObjectManagement::removeObject(ObjectHandle,                               ObjectRemovalReason,                               TypeException &){    printf("ObjectManagement.cc: RemoveObject(2) not implemented.\n");    throw RTIinternalError();}// ----------------------------------------------------------------------------//! changeAttributeTransportTypeEventRetractionHandleObjectManagement::changeAttributeTransportType(ObjectHandle theObjectHandle,                                               AttributeHandle *attribArray,                                               UShort attribArraySize,                                               TransportType theType,                                               TypeException &e){    NetworkMessage req, rep ;    int i ;    req.type = NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE ;    req.object = theObjectHandle ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.transport = theType ;    for (i = 0 ; i < attribArraySize ; i++)        req.handleArray[i] = attribArray[i] ;    comm->sendMessage(&req);    comm->waitMessage(&rep,                      NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE,                      req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// ----------------------------------------------------------------------------//! changeAttributeOrderTypeEventRetractionHandleObjectManagement::changeAttributeOrderType(ObjectHandle theObjectHandle,                                           AttributeHandle *attribArray,                                           UShort attribArraySize,                                           OrderType theType,                                           TypeException &e){    NetworkMessage req, rep ;    int i ;    req.type = NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE ;    req.object = theObjectHandle ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.order = theType ;    for (i = 0 ; i < attribArraySize ; i++)        req.handleArray[i] = attribArray[i] ;    comm->sendMessage(&req);    comm->waitMessage(&rep, NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE, req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// ----------------------------------------------------------------------------//! changeInteractionTransportTypeEventRetractionHandleObjectManagement::changeInteractionTransportType(InteractionClassHandle id,                                                 TransportType theType,                                                 TypeException &e){    NetworkMessage req, rep ;    req.type = NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE ;    req.interactionClass = id ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.transport = theType ;    comm->sendMessage(&req);    comm->waitMessage(&rep, NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE, req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// ----------------------------------------------------------------------------//! changeInteractionOrderTypeEventRetractionHandleObjectManagement::changeInteractionOrderType(InteractionClassHandle id,                                             OrderType theType,                                             TypeException &e){    NetworkMessage req, rep ;    req.type = NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE ;    req.interactionClass = id ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.order = theType ;    comm->sendMessage(&req);    comm->waitMessage(&rep, NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE, req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// ----------------------------------------------------------------------------//! requestObjectAttributeValueUpdateEventRetractionHandleObjectManagement::requestObjectAttributeValueUpdate(ObjectHandle handle,                                                    AttributeHandle *attribs,                                                    UShort attribArraySize,                                                    TypeException &e){    NetworkMessage req, rep ;    req.type = NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE ;    req.object = handle ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    for (int i = 0 ; i < attribArraySize ; i++) {        req.handleArray[i] = attribs[i] ;    }    req.handleArraySize = attribArraySize ;    comm->sendMessage(&req);    comm->waitMessage(&rep, NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE,                      req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// --------------------------------------// -- 4.15 provideAttributeValueUpdate --// --------------------------------------voidObjectManagement::provideAttributeValueUpdate(ObjectHandle,                                              AttributeValue &,                                              TypeException &){    printf("ObjectManagement.cc: "           "provideAttributeValueUpdate not implemented\n");    throw RTIinternalError();}// ------------------// -- 4.16 retract --// ------------------void ObjectManagement::retract(EventRetractionHandle /*theHandle*/,                               TypeException & /*e*/){    printf("GO.cc: retract not implemented.\n");    throw RTIinternalError();}// ----------------------------// -- 4.17 reflectRetraction --// ----------------------------voidObjectManagement::reflectRetraction(EventRetractionHandle,                                    TypeException &){    printf("GO.cc: reflectRetraction not implemented.\n");    throw RTIinternalError();}// ----------------------------------------------------------------------------//! getObjectClassHandle.ObjectClassHandleObjectManagement::getObjectClassHandle(const char *theName){    return rootObject->ObjectClasses->getObjectClassHandle(theName);}// ----------------------------------------------------------------------------//! getObjectClassName.const char *ObjectManagement::getObjectClassName(ObjectClassHandle theHandle){    return rootObject->ObjectClasses->getObjectClassName(theHandle);}// ----------------------------------------------------------------------------//! Returns the object instance handle.ObjectHandleObjectManagement::getObjectInstanceHandle(const char *the_name){    return rootObject->objects->getObjectInstanceHandle(the_name);}// ----------------------------------------------------------------------------//! Returns the object instance name.const char *ObjectManagement::getObjectInstanceName(ObjectHandle the_object){    return rootObject->objects->getObjectInstanceName(the_object);}// ----------------------------------------------------------------------------//! getAttributeHandle.AttributeHandleObjectManagement::getAttributeHandle(const char *theName,                                     ObjectClassHandle theClassHandle){    return rootObject->ObjectClasses->getAttributeHandle(theName,                                                         theClassHandle);}// ----------------------------------------------------------------------------//! getAttributeName.const char *ObjectManagement::getAttributeName(AttributeHandle theHandle,                                   ObjectClassHandle theClassHandle){    return rootObject->ObjectClasses->getAttributeName(theHandle,                                                       theClassHandle);}// ----------------------------------------------------------------------------//! getInteractionClassHandle.InteractionClassHandleObjectManagement::getInteractionClassHandle(const char *theName){    return rootObject->Interactions->getInteractionClassHandle(theName);}// ----------------------------------------------------------------------------//! getInteractionClassName.const char *ObjectManagement::getInteractionClassName(InteractionClassHandle theClassHandle){    return        rootObject->Interactions->getInteractionClassName(theClassHandle);}// ----------------------------------------------------------------------------//! getParameterHandle.ParameterHandleObjectManagement::getParameterHandle(const char *theParameterName,                                     InteractionClassHandle theClassHandle){    return rootObject->Interactions->getParameterHandle(theParameterName,                                                        theClassHandle);}// ----------------------------------------------------------------------------//! getParameterName.const char *ObjectManagement::getParameterName(ParameterHandle theParameterHandle,                                   InteractionClassHandle theClassHandle){    return rootObject->Interactions->getParameterName(theParameterHandle,                                                      theClassHandle);}// ----------------------------------------------------------------------------//! getObjectClassObjectClassHandleObjectManagement::getObjectClass(ObjectHandle object){    return rootObject->objects->getObjectClass(object);}}} // namespace certi/rtia// $Id: ObjectManagement.cc,v 3.14 2004/01/09 16:41:00 breholee Exp $

⌨️ 快捷键说明

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