예제 #1
0
 public CUser(HlaObject _obj)
     : base(_obj)
 {
     // Local Data
     NickName = "Guest";
     Status   = StatusTypes.READY;
     Type     = _obj.Type;
 }
예제 #2
0
파일: ShipFdApp.cs 프로젝트: otopcu/STMS
        private void RegisterObject(HlaObject obj)
        {
            RegisterHlaObject(obj);

            //// DDM - register object with regions
            //// Create a list of attribute set and region set pairs
            //AttributeHandleSetRegionHandleSetPairVector pairs = new AttributeHandleSetRegionHandleSetPairVector();
            //// Construct the region set
            //List<HlaRegion> regions = new List<HlaRegion>();
            //regions.Add(aor1);
            //// Populate the pairs. Here we use all the attributes of the object
            //pairs.Pairs.Add(new KeyValuePair<List<HlaAttribute>, List<HlaRegion>>(obj.Attributes, regions));
            //// register object attributes with related regions
            //RegisterHlaObject(obj, pairs);
            //associateRegionsForUpdates(obj, pairs);
        }
예제 #3
0
 // Copy constructor - used in callbacks
 public CStationHlaObject(HlaObject _obj) : base(_obj)
 {
     // TODO: Instantiate local data here
     StationName = "";
     Location    = LocationEnum.West;
 }
예제 #4
0
 // Add object with no attribute list defined
 private static void addObject(Dictionary <string, List <string> > objectList, HlaObject obj, HlaObjectNode hlaObjectTree)
 {
     // If the object is not in the list, add it
     if (!objectList.ContainsKey(obj.ObjectClassName))
     {
         // Get the complete attribute list
         objectList.Add(obj.ObjectClassName, TreeReader.FindAttributes(hlaObjectTree, obj.ObjectClassName));
     }
 }
예제 #5
0
 // Add object with partial attribute list
 private static void addObjectWithAttributes(Dictionary <string, List <string> > objectList, HlaObject obj)
 {
     if (objectList.ContainsKey(obj.ObjectClassName))    // obect in list, update attribs as needed
     {
         // check the attribute list
         List <string> attribs = objectList[obj.ObjectClassName];
         foreach (HlaAttribute attrib in obj.Attributes)
         {
             if (!attribs.Contains(attrib.AttributeName))
             {
                 attribs.Add(attrib.AttributeName);
             }
         }
     }
     else   // object not in list, add with attributes
     {
         // Build the attributes list
         List <string> attribs = new List <string>();
         foreach (HlaAttribute attrib in obj.Attributes)
         {
             attribs.Add(attrib.AttributeName);
         }
         // Add the object
         objectList.Add(obj.ObjectClassName, attribs);
     }
 }
 // Copy constructor - used in callbacks
 public CSensorHlaObject(HlaObject _obj) : base(_obj)
 {
     // TODO: Instantiate local data here
     // var Data = new Your_LocalData_Type();
 }
예제 #7
0
 // Copy constructor - used in callbacks
 public CShipHlaObject(HlaObject _obj) : base(_obj)
 {
     // TODO: Instantiate local data here
     Ship = new CShip();
 }