Beispiel #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);
        }
 ///<summary>
 ///Number generated by the issuing simulation to associate realted events.
 ///</summary>
 public void setEventID(EventID pEventID)
 {
     _eventID = pEventID;
 }
 ///<summary>
 ///ID firing event
 ///</summary>
 public void setEventID(EventID pEventID)
 {
     _eventID = pEventID;
 }
 ///<summary>
 ///ID of event
 ///</summary>
 public void setCollisionEventID(EventID pCollisionEventID)
 {
     _collisionEventID = pCollisionEventID;
 }
Beispiel #5
0
        /**
         * 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;
        }
 ///<summary>
 ///ID of event
 ///</summary>
 public void setCollisionEventID(EventID pCollisionEventID)
 {
     _collisionEventID = pCollisionEventID;
 }