source: trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/src/Parse_parser_limitparam.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/*
2 *
3 * [desc.]
4 */
5#include "Tools/Viewer/Parser/include/parser.h"
6using namespace morpheo::tools::viewer::bdd;
7namespace morpheo{
8namespace tools{
9namespace viewer{
10namespace parser{     
11
12  void Parse::parser_limitparam(QDomNode n){
13       while( !n.isNull() )
14      {
15        QDomElement e = n.toElement();
16        if( !e.isNull() )
17          {
18           
19            if (e.tagName() == "parameter" )
20              {
21                #ifdef DBUG_PARSE
22                cout << "parameter" <<endl;
23                cout << e.attribute("name","").toStdString() <<endl;
24                #endif
25                limit=new morpheo::tools::viewer::bdd::LimitParam\
26                  (e.attribute("name","").toStdString(),\
27                   e.attribute("min","").toInt(0,10),\
28                   e.attribute("max","").toInt(0,10),\
29                   e.attribute("step","").toStdString(),\
30                   e.attribute("default","").toInt(0,10),\
31                   e.attribute("level","").toInt(0,10));
32               
33                //base->addLimitParam(limit);           
34                parser_limitparam(n.firstChild());
35                if( (n.nextSibling().toElement()).tagName()!= "group"){
36                  base->addLimitParam(limit);           
37                  delete limit;
38                }
39              } 
40            if (e.tagName() == "group" )
41              {
42
43                limit->setGroup(e.attribute("name","").toStdString());
44                base->addLimitParam(limit);             
45                delete limit;
46               
47              }
48            if (e.tagName() == "link" )
49              {
50
51                base->addLinksrc(e.attribute("name","").toStdString(),\
52                                 e.attribute("src","").toStdString());
53                base->addLinkdest(e.attribute("name","").toStdString(),\
54                                 e.attribute("dest","").toStdString());
55              }
56     
57          }
58        n = n.nextSibling(); //next channel
59           
60      }
61     
62  }
63
64};//end parser
65};//end viewer
66};//end tools
67};//end morpheo
68
Note: See TracBrowser for help on using the repository browser.