@brief parses the member information form a file @param path The OpenMS path @param header The header file name @return Returns the parses information */
($bin_path, $header, $debug)
| 309 | @return Returns the parses information |
| 310 | */ |
| 311 | function getClassInfo($bin_path, $header, $debug) { |
| 312 | $members = array( |
| 313 | "classname" => substr(basename($header), |
| 314 | 0,-2), |
| 315 | "public-long" => array(), |
| 316 | "public" => array(), |
| 317 | "non-public" => array(), |
| 318 | "variables" => array(), |
| 319 | "test-name" => array(), |
| 320 | ); |
| 321 | |
| 322 | ######################## needed stuff ############################### |
| 323 | if(!file_exists("$bin_path/doc/xml_output/")) |
| 324 | { |
| 325 | print "Error: The directory '$bin_path/doc/xml_output/' is needed!\n"; |
| 326 | print " Please execute 'make doc_xml' first!\n"; |
| 327 | } |
| 328 | |
| 329 | ######################## load file ############################### |
| 330 | $paths = array( |
| 331 | "", |
| 332 | "Internal_1_1", |
| 333 | "Math_1_1", |
| 334 | "Logger_1_1", |
| 335 | "ims_1_1", |
| 336 | ); |
| 337 | |
| 338 | $found = false; |
| 339 | foreach($paths as $p) |
| 340 | { |
| 341 | //find class |
| 342 | $tmp = "$bin_path/doc/xml_output/classOpenMS_1_1".$p.$members["classname"].".xml"; |
| 343 | if(file_exists($tmp)) |
| 344 | { |
| 345 | $class = simplexml_load_file($tmp); |
| 346 | $found = true; |
| 347 | break; |
| 348 | } |
| 349 | //find struct |
| 350 | else |
| 351 | { |
| 352 | $tmp = "$bin_path/doc/xml_output/structOpenMS_1_1".$p.$members["classname"].".xml"; |
| 353 | if(file_exists($tmp)) |
| 354 | { |
| 355 | $class = simplexml_load_file($tmp); |
| 356 | $found = true; |
| 357 | break; |
| 358 | } |
| 359 | } |
| 360 | } |
| 361 | if(!$found) |
| 362 | { |
| 363 | print "Error: No XML file found for class '".$members["classname"]."'. Aborting!\n"; |
| 364 | return $members; |
| 365 | } |
| 366 | |
| 367 | ######################## parse ############################### |
| 368 | $classname = substr($class->compounddef->compoundname, 8); |
no test coverage detected