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

#include <onelab.h>

Inheritance diagram for onelab::string:
Collaboration diagram for onelab::string:

Public Member Functions

 string (const std::string &name="", const std::string &value="", const std::string &label="", const std::string &help="")
 
 string (const std::string &name, const std::vector< std::string > &values, const std::string &label="", const std::string &help="")
 
void setValue (const std::string &value)
 
void setValues (const std::vector< std::string > &values)
 
void setKind (const std::string &kind)
 
void setChoices (const std::vector< std::string > &choices)
 
std::string getType () const
 
const std::string & getValue () const
 
std::string getValueAsString () const
 
const std::vector< std::string > & getValues () const
 
int getNumValues () const
 
const std::string & getKind () const
 
const std::vector< std::string > & getChoices () const
 
void update (const string &p)
 
std::string toChar () const
 
std::string::size_type fromChar (const std::string &msg)
 
std::string toJSON () const
 
bool fromJSON (const std::string &json)
 
bool fromJSON (const picojson::value::object &par)
 
- Public Member Functions inherited from onelab::parameter
 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 ()
 
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
 
std::string sanitizeJSON (const std::string &in) const
 

Private Attributes

std::vector< std::string > _values
 
std::vector< std::string > _choices
 
std::string _kind
 

Additional Inherited Members

- Static Public Member Functions inherited from onelab::parameter
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 inherited from onelab::parameter
std::map< std::string, std::string > _attributes
 

Detailed Description

Definition at line 678 of file onelab.h.

Constructor & Destructor Documentation

◆ string() [1/2]

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

Definition at line 684 of file onelab.h.

◆ string() [2/2]

onelab::string::string ( const std::string &  name,
const std::vector< std::string > &  values,
const std::string &  label = "",
const std::string &  help = "" 
)
inline

Definition at line 690 of file onelab.h.

Member Function Documentation

◆ fromChar()

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

Reimplemented from onelab::parameter.

Definition at line 755 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:

◆ fromJSON() [1/2]

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

Reimplemented from onelab::parameter.

Definition at line 808 of file onelab.h.

Here is the call graph for this function:

◆ fromJSON() [2/2]

bool onelab::string::fromJSON ( const std::string &  json)
inline

Definition at line 790 of file onelab.h.

Referenced by onelab::parameterSpace::fromJSON().

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

◆ getChoices()

const std::vector<std::string>& onelab::string::getChoices ( ) const
inline

Definition at line 717 of file onelab.h.

Referenced by onelab::localClient::setAndAppendChoices(), and update().

Here is the caller graph for this function:

◆ getKind()

const std::string& onelab::string::getKind ( ) const
inline

Definition at line 716 of file onelab.h.

Referenced by update().

Here is the caller graph for this function:

◆ getNumValues()

int onelab::string::getNumValues ( ) const
inline

Definition at line 715 of file onelab.h.

◆ getType()

std::string onelab::string::getType ( ) const
inlinevirtual

Implements onelab::parameter.

Definition at line 706 of file onelab.h.

◆ getValue()

const std::string& onelab::string::getValue ( ) const
inline

Definition at line 707 of file onelab.h.

Referenced by getValueAsString().

Here is the caller graph for this function:

◆ getValueAsString()

std::string onelab::string::getValueAsString ( ) const
inline

Definition at line 713 of file onelab.h.

Here is the call graph for this function:

◆ getValues()

const std::vector<std::string>& onelab::string::getValues ( ) const
inline

Definition at line 714 of file onelab.h.

Referenced by update().

Here is the caller graph for this function:

◆ setChoices()

void onelab::string::setChoices ( const std::vector< std::string > &  choices)
inline

Definition at line 702 of file onelab.h.

Referenced by onelab::localClient::setAndAppendChoices(), and update().

Here is the caller graph for this function:

◆ setKind()

void onelab::string::setKind ( const std::string &  kind)
inline

Definition at line 701 of file onelab.h.

Referenced by fromChar(), fromJSON(), and update().

Here is the caller graph for this function:

◆ setValue()

void onelab::string::setValue ( const std::string &  value)
inline

Definition at line 695 of file onelab.h.

◆ setValues()

void onelab::string::setValues ( const std::vector< std::string > &  values)
inline

Definition at line 700 of file onelab.h.

Referenced by update().

Here is the caller graph for this function:

◆ toChar()

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

Reimplemented from onelab::parameter.

Definition at line 744 of file onelab.h.

Here is the call graph for this function:

◆ toJSON()

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

Reimplemented from onelab::parameter.

Definition at line 768 of file onelab.h.

Here is the call graph for this function:

◆ update()

void onelab::string::update ( const string p)
inline

Definition at line 718 of file onelab.h.

Here is the call graph for this function:

Member Data Documentation

◆ _choices

std::vector<std::string> onelab::string::_choices
private

Definition at line 680 of file onelab.h.

Referenced by fromChar(), fromJSON(), getChoices(), setChoices(), toChar(), and toJSON().

◆ _kind

std::string onelab::string::_kind
private

Definition at line 681 of file onelab.h.

Referenced by getKind(), setKind(), toChar(), and toJSON().

◆ _values

std::vector<std::string> onelab::string::_values
private

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