Get properties of a DXL Object (i.e. ModuleVersion, ModName_)

Hi!

I often have some DXL Objects, where I ask myself which information they contain itself.

I.e. has ModuleVersion the possibility to get a property like:

ModuleVersion mv;

mv.major

mv.minor

mv.moduleName

etc...

Is there a way to do s.th. like this:

   string test;
   for test in ModuleVersion do {
    print test "\n";
   }

 

 


Bjoern_Karpenstein - Wed Feb 03 04:03:39 EST 2016

Re: Get properties of a DXL Object (i.e. ModuleVersion, ModName_)
Mathias Mamsch - Wed Feb 03 08:08:56 EST 2016

DXL has no runtime "inspection" for normal types. However you can do what you want, by looking at the perms excel list I prepared once. 

If you want to know the properties of the for example, you filter for: 

- name column for "::." ( two : and a . ) which is the name of the "." operator in DXL. 

- parType column for "ModuleVersion"

You will notice that nothing shows up, that means that ModuleVersion does not support the "." operator. 

If you only filter for "name" then you will see every function that takes a ModuleVersion. You will find for example this one: 

This means there is a "for ModuleVersion in ... do" loop. You need however to find out how to get the necessary AllBaselineSet_ item. So you filter for "return type" = "AllBaselineSet_". You find: 

which means that the final loop syntax is:    for ModuleVersion in all BaselineSet do { ... }

The same if you look at name = "::." and parType = "Object" you find those two: 

Interesting, so on the Object you can do   Object.ReservedName__  ... so lets look at what function returns a 'ReservedName__'. Filter for "return type" = "ReservedName__" and you get: 

Hurray, you found a hidden syntax: 

Object o = o.(reserved "Test") ... 

What is means? I don't know. But the same way, you can find for any DXL object which parameters they support after the "." operator. 

Hope this helps, Regards, Mathias

 

Re: Get properties of a DXL Object (i.e. ModuleVersion, ModName_)
Wolfgang Uhr - Wed Mar 02 12:54:23 EST 2016

Hi

A dxl object is nothing else but a skip list.

void listDxlObjectContent(DxlObject dxlToList) {
  Skip skpToList = (Skip addr_(dxlToList));
  string sElementName;
  for sElemntName in skpToList do {
    print sElemntName "\n";
  }
}

DxlObject objTest = new();

// add some Elements

listDxlObjectContent(objTest);

Best regards

Wolfgang