From OpenSCADAWiki
Public methods:
- TVarObj( ); — Constructor.
- int connect( ); — Connection to the object.
- int disconnect( ); — Disconnection from the object.
- virtual void propList( vector<string> &ls ); — Object's properties list ls.
- virtual TVariant propGet( const string &id ); — Request of the object property with an ID id.
- TVariant propGet( const string &ids, char sep ); — Request of the object hierarchical property with a path ids and separator sep.
- virtual void propSet( const string &id, TVariant val ); — Set the object property with an ID id to the value val.
- void propSet( const string &ids, char sep, TVariant val ); — Set the object hierarchical property with a path ids and separator sep to the value val.
- void propClear( const string &ids = "" ); — Property ids clear or all properties clear for empty ids.
- string getStr( const string &tp = "" ); — Conversion-serialisation contents of the object to the XML stream for tp in "xml" or not the generic object and not array; else to JSON.
- virtual string getStrXML( const string &oid = "" ); — Conversion-serialisation contents of the object to the XML stream.
- virtual string getStrJSON( TVariant *it = NULL, unsigned lev = 0 ); — Conversion-serialisation contents of the object to the JSON stream.
- static AutoHD<TVarObj> parseStr( const string &str, AutoHD<TVarObj> prev = NULL ); — Deserialization the stream str to the object firstly from JSON and at an error to XML.
- static AutoHD<TVarObj> parseStrXML( const string &str, XMLNode *nd = NULL, AutoHD<TVarObj> prev = NULL ); — Deserialization the XML-stream str to the object.
- static AutoHD<TVarObj> parseStrJSON( const string &str, AutoHD<TVarObj> prev = NULL ); — Deserialization the JSON-stream str to the object.
- virtual TVariant funcCall( const string &id, vector<TVariant> &prms ); — Call of the object function with the ID id and with the parameters prms.