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

📄 objectmanagement.cc

📁 certi-SHM-3.0.tar 不错的开源的分布式方针软件 大家多多支持 他是linux
💻 CC
📖 第 1 页 / 共 2 页
字号:
    comm->waitMessage(&rep, m_DELETE_OBJECT, req.federate);    e = rep.exception ;    if (e == e_NO_EXCEPTION)        rootObject->ObjectClasses->deleteObject(fm->federate,                                                theObjectHandle,                                                theTag);    return rep.eventRetraction ;}// --------------------------// -- 4.9(1) removeObject --// --------------------------voidObjectManagement::removeObject(ObjectHandle theObjectHandle,                               FederateHandle theFederateHandle,                               const char *theTag,                               EventRetractionHandle theHandle,                               TypeException &){    Message req, rep ;    req.type = REMOVE_OBJECT ;    req.object = theObjectHandle ;    req.eventRetraction = theHandle ;    req.setTag(theTag);    // BUG: On fait quoi de la reponse ?    comm->requestFederateService(&req, &rep);    rootObject->ObjectClasses->deleteObject(theFederateHandle,                                            theObjectHandle,                                            theTag);}// --------------------------// -- 4.9(2) removeObject --// --------------------------voidObjectManagement::removeObject(ObjectHandle,                               ObjectRemovalReason,                               TypeException &){    printf("ObjectManagement.cc: RemoveObject(2) not implemented.\n");    throw RTIinternalError();}// ---------------------------------------// -- 4.10 changeAttributeTransportType --// ---------------------------------------EventRetractionHandleObjectManagement::changeAttributeTransportType(ObjectHandle theObjectHandle,                                               AttributeHandle *attribArray,                                               UShort attribArraySize,                                               TransportType theType,                                               TypeException &e){    NetworkMessage req, rep ;    int i ;    req.type = m_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,                      m_CHANGE_ATTRIBUTE_TRANSPORT_TYPE,                      req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// -----------------------------------// -- 4.11 changeAttributeOrderType --// -----------------------------------EventRetractionHandleObjectManagement::changeAttributeOrderType(ObjectHandle theObjectHandle,                                           AttributeHandle *attribArray,                                           UShort attribArraySize,                                           OrderType theType,                                           TypeException &e){    NetworkMessage req, rep ;    int i ;    req.type = m_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, m_CHANGE_ATTRIBUTE_ORDER_TYPE, req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// -----------------------------------------// -- 4.12 changeInteractionTransportType --// -----------------------------------------EventRetractionHandle ObjectManagement::changeInteractionTransportType(InteractionClassHandle theClassID,                               TransportType theType,                               TypeException &e){    NetworkMessage req, rep ;    req.type = m_CHANGE_INTERACTION_TRANSPORT_TYPE ;    req.interactionClass = theClassID ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.transport = theType ;    comm->sendMessage(&req);    comm->waitMessage(&rep,                      m_CHANGE_INTERACTION_TRANSPORT_TYPE,                      req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// -------------------------------------// -- 4.13 changeInteractionOrderType --// -------------------------------------EventRetractionHandleObjectManagement::changeInteractionOrderType(InteractionClassHandle theClassID,                                             OrderType theType,                                             TypeException &e){    NetworkMessage req, rep ;    req.type = m_CHANGE_INTERACTION_ORDER_TYPE ;    req.interactionClass = theClassID ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    req.order = theType ;    comm->sendMessage(&req);    comm->waitMessage(&rep, m_CHANGE_INTERACTION_ORDER_TYPE, req.federate);    e = rep.exception ;    return rep.eventRetraction ;}// ------------------------------------------------// -- 4.14(1) requestObjectAttributeValueUpdate --// ------------------------------------------------EventRetractionHandle ObjectManagement::requestObjectAttributeValueUpdate(ObjectHandle theObjectHandle,                                  AttributeHandle *attribArray,                                  UShort attribArraySize,                                  TypeException &e){    NetworkMessage req, rep ;    int i ;    req.type = m_REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE ;    req.object = theObjectHandle ;    req.federation = fm->_numero_federation ;    req.federate = fm->federate ;    for (i = 0 ; i < attribArraySize ; i++)        req.handleArray[i] = attribArray[i] ;    req.handleArraySize = attribArraySize ;    comm->sendMessage(&req);    comm->waitMessage(&rep,                      m_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);}// ----------------------------------------------------------------------------//! 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);}}} // namespace certi/rtia// $Id: ObjectManagement.cc,v 3.5 2003/02/19 15:45:22 breholee Exp $

⌨️ 快捷键说明

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