Changeset 171 for cpp/frams/vm/classes
- Timestamp:
- 03/13/14 01:00:33 (11 years ago)
- Location:
- cpp/frams/vm/classes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/vm/classes/3dobject.cpp
r156 r171 193 193 Pt3D_Ext* Pt3D_Ext::fromObject(const ExtValue& v) 194 194 { 195 if (v.type!=TObj) return 0; 196 const ExtObject& o=v.getObject(); 197 return (Pt3D_Ext*)o.getTarget(getStaticParam().getName()); 195 return (Pt3D_Ext*)v.getObjectTarget(getStaticParam().getName()); 198 196 } 199 197 … … 444 442 Orient_Ext* Orient_Ext::fromObject(const ExtValue& v) 445 443 { 446 if (v.type!=TObj) return 0; 447 const ExtObject& o=v.getObject(); 448 return (Orient_Ext*)o.getTarget(getStaticParam().getName()); 444 return (Orient_Ext*)v.getObjectTarget(getStaticParam().getName()); 449 445 } 450 446 … … 573 569 ReferenceObj* ReferenceObj::fromObject(const ExtValue& v) 574 570 { 575 if (v.type!=TObj) return 0; 576 const ExtObject& o=v.getObject(); 577 return (ReferenceObj*)o.getTarget(getStaticParam().getName()); 578 } 571 return (ReferenceObj*)v.getObjectTarget(getStaticParam().getName()); 572 } -
cpp/frams/vm/classes/collectionobj.cpp
r164 r171 266 266 } 267 267 268 VectorObject* VectorObject::fromObject(const ExtObject& o )269 { 270 return (VectorObject*)o.getTarget(par.getName() );268 VectorObject* VectorObject::fromObject(const ExtObject& o, bool warn) 269 { 270 return (VectorObject*)o.getTarget(par.getName(),true,warn); 271 271 } 272 272 … … 424 424 } 425 425 426 DictionaryObject* DictionaryObject::fromObject(const ExtObject& o )427 { 428 return (DictionaryObject*)o.getTarget(par.getName() );426 DictionaryObject* DictionaryObject::fromObject(const ExtObject& o, bool warn) 427 { 428 return (DictionaryObject*)o.getTarget(par.getName(), true, warn); 429 429 } 430 430 -
cpp/frams/vm/classes/collectionobj.h
r121 r171 44 44 ExtObject makeObject() {return ExtObject(&par,this);} 45 45 46 static VectorObject* fromObject(const ExtObject& o );46 static VectorObject* fromObject(const ExtObject& o, bool warn=true); 47 47 }; 48 48 … … 74 74 static void p_new(void*,ExtValue*args,ExtValue*ret) 75 75 {ret->setObject(ExtObject(&par,new DictionaryObject));} 76 static DictionaryObject* fromObject(const ExtObject& v );76 static DictionaryObject* fromObject(const ExtObject& v, bool warn=true); 77 77 ExtObject makeObject() {return ExtObject(&par,this);} 78 78 }; -
cpp/frams/vm/classes/genoobj.cpp
r138 r171 107 107 } 108 108 109 Geno* GenoObj::fromObject(const ExtValue& v )109 Geno* GenoObj::fromObject(const ExtValue& v, bool warn) 110 110 { 111 if (v.type!=TObj) return 0; 112 const ExtObject& o=v.getObject(); 113 //if ((o.param!=&getStaticParam())&&(o.param!=&getDynamicParam())) return 0; 114 return (Geno*)o.getTarget(getStaticParam().getName()); 111 return (Geno*)v.getObjectTarget(getStaticParam().getName(), warn); 115 112 } -
cpp/frams/vm/classes/genoobj.h
r138 r171 33 33 static ExtObject makeDynamicObject(Geno* g); 34 34 static ExtObject makeDynamicObjectAndDecRef(Geno* g); 35 static Geno* fromObject(const ExtValue& v );35 static Geno* fromObject(const ExtValue& v, bool warn=true); 36 36 static ParamInterface* getInterface(); 37 37
Note: See TracChangeset
for help on using the changeset viewer.