Пример #1
0
 public void addObject(RecogObject obj)
 {
     this.objects[obj.identifier] = obj;
     foreach (string property in obj.getProperties())
     {
         if (!this.lookupByProperty.ContainsKey(property))
         {
             this.lookupByProperty[property] = new List<RecogObject>();
         }
         this.lookupByProperty[property].Add(obj);
     }
 }
Пример #2
0
 public static RecogObject fromString(string s)
 {
     string[] parts = s.Split(' ');
     RecogObject rtn = new RecogObject(parts[0]);
     bool flag = false;
     foreach (string p in parts) {
         if (flag)
         {
             rtn.properties.Add(p);
         }
         else
         {
             flag = true;
         }
     }
     return rtn;
 }
Пример #3
0
 public bool saveObject()
 {
     if (this.curLearning == null)
     {
         return false;
     }
     else
     {
         // Send updated identifier to through thrift
         if (client.update(this.curLearning.Identifier, this.curLearningName))
         {
             this.unknownPointClouds.Remove(this.curLearning.Identifier);
             this.curLearning.Identifier = this.curLearningName;
             this.knownPointClouds[this.curLearningName] = this.curLearning;
             RecogObject obj = new RecogObject(this.curLearningName);
             obj.addProperties(props);
             this.addObject(obj);
             this.curLearning = null;
             this.curLearningName = null;
             return true;
         }
         else
         {
             return false;
         }
     }
 }