コード例 #1
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(EventID rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            if (!(_site == rhs._site))
            {
                ivarsEqual = false;
            }
            if (!(_application == rhs._application))
            {
                ivarsEqual = false;
            }
            if (!(_eventNumber == rhs._eventNumber))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
コード例 #2
0
 ///<summary>
 ///Number generated by the issuing simulation to associate realted events.
 ///</summary>
 public void setEventID(EventID pEventID)
 {
     _eventID = pEventID;
 }
コード例 #3
0
 ///<summary>
 ///ID firing event
 ///</summary>
 public void setEventID(EventID pEventID)
 {
     _eventID = pEventID;
 }
コード例 #4
0
 ///<summary>
 ///ID of event
 ///</summary>
 public void setCollisionEventID(EventID pCollisionEventID)
 {
     _collisionEventID = pCollisionEventID;
 }
コード例 #5
0
ファイル: EventID.cs プロジェクト: mcgredonps/open-dis-csharp
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(EventID rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
                return false;

            if( ! (_site == rhs._site)) ivarsEqual = false;
            if( ! (_application == rhs._application)) ivarsEqual = false;
            if( ! (_eventNumber == rhs._eventNumber)) ivarsEqual = false;

            return ivarsEqual;
        }
コード例 #6
0
 ///<summary>
 ///ID of event
 ///</summary>
 public void setCollisionEventID(EventID pCollisionEventID)
 {
     _collisionEventID = pCollisionEventID;
 }