📄 objectset.hh
字号:
// ----------------------------------------------------------------------------// CERTI - HLA RunTime Infrastructure// Copyright (C) 2003 ONERA//// This file is part of CERTI-libCERTI//// CERTI-libCERTI is free software ; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public License// as published by the Free Software Foundation ; either version 2 of// the License, or (at your option) any later version.//// CERTI-libCERTI is distributed in the hope that it will be useful, but// WITHOUT ANY WARRANTY ; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this program ; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307// USA//// ----------------------------------------------------------------------------#ifndef _CERTI_OBJECT_SET_HH#define _CERTI_OBJECT_SET_HH// Project#include "Object.hh"#include "ObjectSet.hh"#include "SecurityServer.hh"#include "RTItypes.hh"// Standard#include <map>namespace certi {class ObjectSet : private std::map<ObjectHandle, Object *>{public: // Public Methods. ObjectSet(SecurityServer *the_server); ~ObjectSet(); ObjectHandle getObjectInstanceHandle(const char *the_name) const throw (ObjectNotKnown, RTIinternalError); const char * getObjectInstanceName(ObjectHandle the_object) const throw (ObjectNotKnown, RTIinternalError); ObjectClassHandle getObjectClass(ObjectHandle the_object) const throw (ObjectNotKnown, FederateNotExecutionMember, ConcurrentAccessAttempted, RTIinternalError); void changeAttributeTransportationType(ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size, TransportType the_type) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle); void changeAttributeOrderType(ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size, TransportType the_type) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError, InvalidObjectHandle); Object *registerObjectInstance(FederateHandle, ObjectClassHandle, ObjectHandle, const char *) throw (ObjectAlreadyRegistered, ConcurrentAccessAttempted, SaveInProgress, RestoreInProgress, RTIinternalError); void deleteObjectInstance(FederateHandle, ObjectHandle, const char *) throw (ObjectNotKnown, DeletePrivilegeNotHeld, FederateNotExecutionMember, ConcurrentAccessAttempted, SaveInProgress, RestoreInProgress, RTIinternalError); void killFederate(FederateHandle) throw (RTIinternalError); // Ownership Management. bool isAttributeOwnedByFederate(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle the_attribute) const throw (ObjectNotKnown, AttributeNotDefined, RTIinternalError); void queryAttributeOwnership(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle the_attribute) const throw (ObjectNotKnown, AttributeNotDefined, RTIinternalError); void negotiatedAttributeOwnershipDivestiture(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size, const char *the_tag) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, RTIinternalError); void attributeOwnershipAcquisitionIfAvailable(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, RTIinternalError); void unconditionalAttributeOwnershipDivestiture(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError); void attributeOwnershipAcquisition(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size, const char *the_tag) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, RTIinternalError); void cancelNegotiatedAttributeOwnershipDivestiture(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *, UShort the_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeDivestitureWasNotRequested, RTIinternalError); AttributeHandleSet * attributeOwnershipReleaseResponse(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateWasNotAskedToReleaseAttribute, RTIinternalError); void cancelAttributeOwnershipAcquisition(FederateHandle the_federate, ObjectHandle the_object, AttributeHandle *the_attributes, UShort the_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeAlreadyOwned, AttributeAcquisitionWasNotRequested, RTIinternalError); Object *getObject(ObjectHandle the_object) const throw (ObjectNotKnown);protected: void sendToFederate(NetworkMessage *msg, FederateHandle the_federate) const ; SecurityServer *server ;};} // namespace certi#endif // _CERTI_OBJECT_SET_HH
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -