TestGrammar/src/ParseObjects.cpp
// returns specific link for provided object (decision is made by type)
// for: array;number as types and [ArrayOfSomething];[] as links and if obj is array the returned value is [ArrayOfSomething]
returns specific link for provided object (decision is made by type)
for: array;number as types and [ArrayOfSomething];[] as links and if obj is array the returned value is [ArrayOfSomething]
returns specific link for provided object ( decision is made by type ) for : array ; number as types and [ ArrayOfSomething ] ; [] as links and if obj is array the returned value is [ ArrayOfSomething ]
std::string CParsePDF::get_link_for_type(PdsObject* obj, const std::string &types, const std::string &links) {
  int index = get_type_index(obj, types);
  if (index == -1)
    return "[]";
  std::vector<std::string> lnk = split(links, ';');
  if (index >= lnk.size())  
    return "";
  return lnk[index];
}
std :: string CParsePDF :: get_link_for_type ( PdsObject * obj , const std :: string & types , const std :: string & links ) { int index = get_type_index ( obj , types ) ; if ( index == -1 ) return " " ; std :: vector < std :: string > lnk = split ( links , ' ' ) ; if ( index >= lnk . size ( ) ) return " " ; return lnk [ index ] ; }
returns specific link for provided object (decision is made by type)
for: array;number as types and [ArrayOfSomething];[] as links and if obj is array the returned value is [ArrayOfSomething]
returns specific link for provided object ( decision is made by type ) for : array ; number as types and [ ArrayOfSomething ] ; [] as links and if obj is array the returned value is [ ArrayOfSomething ]
// for ArrayOfDifferences: types is "INTEGER;NAME", links is "" and we get buffer overflow in lnk!