gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
onelab::parameter Class Referenceabstract

#include <onelab.h>

Inheritance diagram for onelab::parameter:

Public Member Functions

 parameter (const std::string &name="", const std::string &label="", const std::string &help="")
 
virtual ~parameter ()
 
void setName (const std::string &name)
 
void setLabel (const std::string &label)
 
void setHelp (const std::string &help)
 
void setChanged (int changed, const std::string &client="")
 
void setChangedValue (int value)
 
void setNeverChanged (bool never)
 
void setVisible (bool visible)
 
void setReadOnly (bool readOnly)
 
void setAttribute (const std::string &key, const std::string &value)
 
void setAttributes (const std::map< std::string, std::string > &attributes)
 
void setClients (const std::map< std::string, int > &clients)
 
void addClient (const std::string &client, int changed)
 
void addClients (const std::map< std::string, int > &clients)
 
bool hasClient (const std::string &client)
 
int getNumClients ()
 
virtual std::string getType () const =0
 
const std::string & getName () const
 
const std::string & getLabel () const
 
const std::string & getHelp () const
 
std::string getPath () const
 
std::string getShortName () const
 
int getChanged (const std::string &client="") const
 
int getChangedValue () const
 
bool getNeverChanged () const
 
bool getVisible () const
 
bool getReadOnly () const
 
std::string getAttribute (const std::string &key) const
 
const std::map< std::string, std::string > & getAttributes () const
 
const std::map< std::string, int > & getClients () const
 
std::string sanitize (const std::string &in) const
 
virtual std::string toChar () const
 
virtual std::string::size_type fromChar (const std::string &msg)
 
std::string sanitizeJSON (const std::string &in) const
 
virtual std::string toJSON () const
 
virtual bool fromJSON (const picojson::value::object &par)
 

Static Public Member Functions

static char charSep ()
 
static double maxNumber ()
 
static std::string version ()
 
static int defaultChangedValue ()
 
static std::string getNextToken (const std::string &msg, std::string::size_type &first, char separator=charSep())
 
static std::vector< std::string > split (const std::string &msg, char separator=charSep())
 
static std::string trim (const std::string &str, const std::string &whitespace=" \t\n")
 
static void getInfoFromChar (const std::string &msg, std::string &version, std::string &type, std::string &name)
 
static bool fromFile (std::vector< std::string > &msg, FILE *fp)
 
static bool toFile (const std::vector< std::string > &msg, FILE *fp, const std::string &creator)
 

Protected Attributes

std::map< std::string, std::string > _attributes
 

Private Attributes

std::string _name
 
std::string _label
 
std::string _help
 
std::map< std::string, int > _clients
 
int _changedValue
 
bool _visible
 
bool _readOnly
 

Detailed Description

Definition at line 48 of file onelab.h.

Constructor & Destructor Documentation

◆ parameter()

onelab::parameter::parameter ( const std::string &  name = "",
const std::string &  label = "",
const std::string &  help = "" 
)
inline

Definition at line 82 of file onelab.h.

Here is the call graph for this function:

◆ ~parameter()

virtual onelab::parameter::~parameter ( )
inlinevirtual

Definition at line 89 of file onelab.h.

Member Function Documentation

◆ addClient()

void onelab::parameter::addClient ( const std::string &  client,
int  changed 
)
inline

Definition at line 123 of file onelab.h.

Referenced by fromChar(), and fromJSON().

Here is the caller graph for this function:

◆ addClients()

void onelab::parameter::addClients ( const std::map< std::string, int > &  clients)
inline

Definition at line 127 of file onelab.h.

Referenced by onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ charSep()

static char onelab::parameter::charSep ( )
inlinestatic

Definition at line 203 of file onelab.h.

Referenced by onelab::remoteNetworkClient::runNonBlockingSubClient(), sanitize(), toChar(), onelab::number::toChar(), and onelab::string::toChar().

Here is the caller graph for this function:

◆ defaultChangedValue()

static int onelab::parameter::defaultChangedValue ( )
inlinestatic

Definition at line 206 of file onelab.h.

Referenced by onelab::parameterSpace::_get(), onelab::parameterSpace::_getPtr(), onelab::parameterSpace::_set(), parameter(), and setNeverChanged().

Here is the caller graph for this function:

◆ fromChar()

virtual std::string::size_type onelab::parameter::fromChar ( const std::string &  msg)
inlinevirtual

Reimplemented in onelab::string, and onelab::number.

Definition at line 271 of file onelab.h.

Referenced by onelab::number::fromChar(), and onelab::string::fromChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromFile()

static bool onelab::parameter::fromFile ( std::vector< std::string > &  msg,
FILE *  fp 
)
inlinestatic

Definition at line 303 of file onelab.h.

Referenced by onelab::client::fromFile(), and onelab::server::fromFile().

Here is the caller graph for this function:

◆ fromJSON()

virtual bool onelab::parameter::fromJSON ( const picojson::value::object par)
inlinevirtual

Reimplemented in onelab::string, and onelab::number.

Definition at line 369 of file onelab.h.

Referenced by onelab::number::fromJSON(), and onelab::string::fromJSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttribute()

std::string onelab::parameter::getAttribute ( const std::string &  key) const
inline

Definition at line 192 of file onelab.h.

Referenced by getShortName().

Here is the caller graph for this function:

◆ getAttributes()

const std::map<std::string, std::string>& onelab::parameter::getAttributes ( ) const
inline

Definition at line 198 of file onelab.h.

Referenced by onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getChanged()

int onelab::parameter::getChanged ( const std::string &  client = "") const
inline

Definition at line 171 of file onelab.h.

◆ getChangedValue()

int onelab::parameter::getChangedValue ( ) const
inline

Definition at line 188 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getClients()

const std::map<std::string, int>& onelab::parameter::getClients ( ) const
inline

Definition at line 202 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getHelp()

const std::string& onelab::parameter::getHelp ( ) const
inline

Definition at line 139 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getInfoFromChar()

static void onelab::parameter::getInfoFromChar ( const std::string &  msg,
std::string &  version,
std::string &  type,
std::string &  name 
)
inlinestatic

Definition at line 295 of file onelab.h.

Referenced by onelab::parameterSpace::fromChar(), and onelab::client::fromChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLabel()

const std::string& onelab::parameter::getLabel ( ) const
inline

Definition at line 138 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getName()

const std::string& onelab::parameter::getName ( ) const
inline

Definition at line 137 of file onelab.h.

Referenced by onelab::parameterLessThan::operator()(), toChar(), and toJSON().

Here is the caller graph for this function:

◆ getNeverChanged()

bool onelab::parameter::getNeverChanged ( ) const
inline

Definition at line 189 of file onelab.h.

Referenced by onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getNextToken()

static std::string onelab::parameter::getNextToken ( const std::string &  msg,
std::string::size_type &  first,
char  separator = charSep() 
)
inlinestatic

Definition at line 207 of file onelab.h.

Referenced by fromChar(), onelab::number::fromChar(), onelab::string::fromChar(), getInfoFromChar(), and split().

Here is the caller graph for this function:

◆ getNumClients()

int onelab::parameter::getNumClients ( )
inline

Definition at line 135 of file onelab.h.

◆ getPath()

std::string onelab::parameter::getPath ( ) const
inline

Definition at line 140 of file onelab.h.

◆ getReadOnly()

bool onelab::parameter::getReadOnly ( ) const
inline

Definition at line 191 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ getShortName()

std::string onelab::parameter::getShortName ( ) const
inline

Definition at line 145 of file onelab.h.

Here is the call graph for this function:

◆ getType()

virtual std::string onelab::parameter::getType ( ) const
pure virtual

Implemented in onelab::string, and onelab::number.

Referenced by fromChar(), toChar(), and toJSON().

Here is the caller graph for this function:

◆ getVisible()

bool onelab::parameter::getVisible ( ) const
inline

Definition at line 190 of file onelab.h.

Referenced by toChar(), toJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ hasClient()

bool onelab::parameter::hasClient ( const std::string &  client)
inline

Definition at line 131 of file onelab.h.

◆ maxNumber()

static double onelab::parameter::maxNumber ( )
inlinestatic

Definition at line 204 of file onelab.h.

Referenced by Msg::ExchangeOnelabParameter().

Here is the caller graph for this function:

◆ sanitize()

std::string onelab::parameter::sanitize ( const std::string &  in) const
inline

Definition at line 246 of file onelab.h.

Referenced by toChar(), onelab::number::toChar(), and onelab::string::toChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sanitizeJSON()

std::string onelab::parameter::sanitizeJSON ( const std::string &  in) const
inline

Definition at line 332 of file onelab.h.

Referenced by toJSON(), onelab::number::toJSON(), and onelab::string::toJSON().

Here is the caller graph for this function:

◆ setAttribute()

void onelab::parameter::setAttribute ( const std::string &  key,
const std::string &  value 
)
inline

Definition at line 111 of file onelab.h.

Referenced by fromChar(), fromJSON(), and Msg::ImportPhysicalGroupsInOnelab().

Here is the caller graph for this function:

◆ setAttributes()

void onelab::parameter::setAttributes ( const std::map< std::string, std::string > &  attributes)
inline

Definition at line 115 of file onelab.h.

Referenced by onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ setChanged()

void onelab::parameter::setChanged ( int  changed,
const std::string &  client = "" 
)
inline

Definition at line 93 of file onelab.h.

Referenced by onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ setChangedValue()

void onelab::parameter::setChangedValue ( int  value)
inline

Definition at line 104 of file onelab.h.

Referenced by fromChar(), fromJSON(), Msg::ImportPhysicalGroupsInOnelab(), and Msg::SetOnelabAction().

Here is the caller graph for this function:

◆ setClients()

void onelab::parameter::setClients ( const std::map< std::string, int > &  clients)
inline

Definition at line 119 of file onelab.h.

◆ setHelp()

void onelab::parameter::setHelp ( const std::string &  help)
inline

Definition at line 92 of file onelab.h.

Referenced by fromChar(), fromJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ setLabel()

void onelab::parameter::setLabel ( const std::string &  label)
inline

Definition at line 91 of file onelab.h.

Referenced by fromChar(), fromJSON(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ setName()

void onelab::parameter::setName ( const std::string &  name)
inline

Definition at line 90 of file onelab.h.

Referenced by fromChar(), and fromJSON().

Here is the caller graph for this function:

◆ setNeverChanged()

void onelab::parameter::setNeverChanged ( bool  never)
inline

Definition at line 105 of file onelab.h.

Here is the call graph for this function:

◆ setReadOnly()

void onelab::parameter::setReadOnly ( bool  readOnly)
inline

Definition at line 110 of file onelab.h.

Referenced by fromChar(), fromJSON(), Msg::ImportPhysicalGroupsInOnelab(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ setVisible()

void onelab::parameter::setVisible ( bool  visible)
inline

Definition at line 109 of file onelab.h.

Referenced by fromChar(), fromJSON(), Msg::ImportPhysicalGroupsInOnelab(), Msg::SetOnelabAction(), Msg::SetOnelabNumber(), onelab::number::update(), and onelab::string::update().

Here is the caller graph for this function:

◆ split()

static std::vector<std::string> onelab::parameter::split ( const std::string &  msg,
char  separator = charSep() 
)
inlinestatic

Definition at line 228 of file onelab.h.

Here is the call graph for this function:

◆ toChar()

virtual std::string onelab::parameter::toChar ( ) const
inlinevirtual

Reimplemented in onelab::string, and onelab::number.

Definition at line 253 of file onelab.h.

Referenced by onelab::number::toChar(), and onelab::string::toChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toFile()

static bool onelab::parameter::toFile ( const std::vector< std::string > &  msg,
FILE *  fp,
const std::string &  creator 
)
inlinestatic

Definition at line 318 of file onelab.h.

Referenced by onelab::client::toFile(), and onelab::server::toFile().

Here is the caller graph for this function:

◆ toJSON()

virtual std::string onelab::parameter::toJSON ( ) const
inlinevirtual

Reimplemented in onelab::string, and onelab::number.

Definition at line 337 of file onelab.h.

Referenced by onelab::number::toJSON(), and onelab::string::toJSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trim()

static std::string onelab::parameter::trim ( const std::string &  str,
const std::string &  whitespace = " \t\n" 
)
inlinestatic

Definition at line 237 of file onelab.h.

◆ version()

static std::string onelab::parameter::version ( )
inlinestatic

Member Data Documentation

◆ _attributes

std::map<std::string, std::string> onelab::parameter::_attributes
protected

Definition at line 79 of file onelab.h.

Referenced by getAttribute(), getAttributes(), setAttribute(), setAttributes(), toChar(), and toJSON().

◆ _changedValue

int onelab::parameter::_changedValue
private

◆ _clients

std::map<std::string, int> onelab::parameter::_clients
private

◆ _help

std::string onelab::parameter::_help
private

Definition at line 60 of file onelab.h.

Referenced by getHelp(), and setHelp().

◆ _label

std::string onelab::parameter::_label
private

Definition at line 58 of file onelab.h.

Referenced by getLabel(), getShortName(), and setLabel().

◆ _name

std::string onelab::parameter::_name
private

Definition at line 55 of file onelab.h.

Referenced by getName(), getPath(), getShortName(), and setName().

◆ _readOnly

bool onelab::parameter::_readOnly
private

Definition at line 75 of file onelab.h.

Referenced by getReadOnly(), and setReadOnly().

◆ _visible

bool onelab::parameter::_visible
private

Definition at line 73 of file onelab.h.

Referenced by getVisible(), and setVisible().


The documentation for this class was generated from the following file: