Changeset 312 in pacpusframework for trunk/src/PacpusLib


Ignore:
Timestamp:
Jul 28, 2014, 4:11:30 PM (10 years ago)
Author:
Marek Kurdej
Message:

ComponentBase: added addParameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusLib/ComponentBase.cpp

    r292 r312  
    9191    LOG_INFO("component " << getName() << " was created");
    9292
     93    addParameter("name", value<string>(&mName)->required(), "component name");
     94    addParameter("type", value<string>(&mTypeName)->required(), "component type");
    9395    addParameters()
    94         ("name", po::value<string>(&mName)->required(), "component name")
    95         ("type", po::value<string>(&mTypeName)->required(), "component type")
    96         ("ui", po::value<bool>(&mHasGui)->default_value(false), "whether to show GUI")
    97         ("verbose", po::value<bool>(&mVerbose)->default_value(false), "set output verbose")
    98         ("verbosity-level", po::value<int>(&mVerbosityLevel)->default_value(0), "set verbosity level")
    99         ("recording", po::value<bool>(&mIsRecording)->default_value(false), "whether to record data")
     96        //("name", value<string>(&mName)->required(), "component name")
     97        //("type", value<string>(&mTypeName)->required(), "component type")
     98        ("ui", value<bool>(&mHasGui)->default_value(false), "whether to show GUI")
     99        ("verbose", value<bool>(&mVerbose)->default_value(false), "set output verbose")
     100        ("verbosity-level", value<int>(&mVerbosityLevel)->default_value(0), "set verbosity level")
     101        ("recording", value<bool>(&mIsRecording)->default_value(false), "whether to record data")
    100102    ;
    101103}
     
    283285}
    284286
     287void ComponentBase::addParameter(const char* name, const char* description)
     288{
     289    addParameters()(name, description);
     290}
     291
     292void ComponentBase::addParameter(const char* name, const po::value_semantic* s)
     293{
     294    addParameters()(name, s);
     295}
     296
     297void ComponentBase::addParameter(const char* name, const po::value_semantic* s, const char* description)
     298{
     299    addParameters()(name, s, description);
     300}
     301       
    285302class DomElementParser
    286303    : boost::noncopyable
Note: See TracChangeset for help on using the changeset viewer.