Structure data

Top  Previous  Next

How to ... > Structure data

 

Neither one's own  classes nor structures can be defined in the TextTransformer interpreter. If this is really required, you have to do it in the external code or in the part of code, which is exportable only. For most purposes, however, node/dnode is completely sufficient as a structure substitute. E.g. the typical data of an employee existing as strings can be stored in a node like that:.

 

node n(sFirstName, sLastName);

  n.setAttrib("street", sStreet);

  n.setAttrib("address", sAddress);

  n.setAttrib("bithday", sBirthday);

  n.setAttrib("salary", sSalary);

 

Several of such data sets can be managed as a sub-nodes in a tree and e.g. several of nodes or trees can be collected in a mstrnode class element too.



This page belongs to the TextTransformer Documentation

Home  Content  German