//===========================================================================// // File: entity2.hh // // Project: MUNGA Brick: Entity Manager // // Contents: Interface specification for entity class // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 11/29/94 JMA Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1994, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #if !defined(ENTITYID_HPP) #define ENTITYID_HPP #if !defined(NETWORK_HPP) #include #endif //########################################################################## //########################## EntityID ################################ //########################################################################## class EntityID { public: #if defined(USE_SIGNATURE) friend int Is_Signature_Bad(const volatile EntityID *); #endif typedef Enumeration LocalID; EntityID(); EntityID(const EntityID&); EntityID(HostID); EntityID(HostID, LocalID); Logical TestInstance() const; HostID GetHostID() {return hostID;} Logical operator!() const {Check(this); return operator==(Null);} EntityID& operator=(const EntityID&); EntityID operator-(const EntityID&) const; EntityID& operator+=(const EntityID&); EntityID& operator-=(const EntityID&); EntityID& operator+=(LocalID); EntityID& operator-=(LocalID); Logical operator<(const EntityID&) const; Logical operator<=(const EntityID&) const; Logical operator>(const EntityID&) const; Logical operator>=(const EntityID&) const; Logical operator==(const EntityID&) const; Logical operator!=(const EntityID&) const; operator int() const; static EntityID Null; static LocalID LocalNull; friend ostream& operator<<( ostream& stream, const EntityID& v ) {return stream << v.hostID << ':' << v.localID;} private: HostID hostID; LocalID localID; }; #endif