#include <VarHolder.h>
Definition at line 111 of file VarHolder.h.
◆ VarHolder()
Prompt::VarHolder::VarHolder |
( |
| ) |
|
◆ ~VarHolder()
virtual Prompt::VarHolder::~VarHolder |
( |
| ) |
|
|
inlinevirtual |
◆ addVar()
bool Prompt::VarHolder::addVar |
( |
unsigned |
key, |
|
|
double |
value |
|
) |
| |
|
inline |
Adds a variable to the VarHolder.
This function adds a variable to the VarHolder using the specified key and value.
- Parameters
-
key | The key of the variable. |
value | The value of the variable. |
- Returns
- True if the variable was successfully added, false otherwise.
Definition at line 210 of file VarHolder.h.
217 if(vit->getKey() ==
key) {
◆ asStr() [1/2]
◆ asStr() [2/2]
std::string Prompt::VarHolder::asStr |
( |
const uint32_t |
key, |
|
|
const double |
val |
|
) |
| |
◆ clearVars()
void Prompt::VarHolder::clearVars |
( |
| ) |
|
|
inlinevirtual |
◆ convert2Str()
◆ convert2Var() [1/2]
◆ convert2Var() [2/2]
◆ delVar()
bool Prompt::VarHolder::delVar |
( |
unsigned |
key | ) |
|
|
inline |
◆ getAllVarEnums()
void Prompt::VarHolder::getAllVarEnums |
( |
| ) |
|
◆ getObjectType()
static std::string Prompt::VarHolder::getObjectType |
( |
| ) |
|
|
inlinestatic |
◆ getVar() [1/3]
double Prompt::VarHolder::getVar |
( |
const unsigned |
key | ) |
const |
|
inline |
Definition at line 275 of file VarHolder.h.
281 #endif // PROMPT_VARHOLDER_H
◆ getVar() [2/3]
bool Prompt::VarHolder::getVar |
( |
const unsigned |
key, |
|
|
double & |
value |
|
) |
| const |
|
inline |
◆ getVar() [3/3]
bool Prompt::VarHolder::getVar |
( |
const unsigned |
key, |
|
|
float & |
value |
|
) |
| const |
|
inline |
◆ hasKey()
bool Prompt::VarHolder::hasKey |
( |
unsigned |
key | ) |
const |
|
inline |
◆ hasVar()
bool Prompt::VarHolder::hasVar |
( |
unsigned |
key | ) |
const |
|
inline |
◆ readVars()
Definition at line 123 of file VarHolder.cxx.
130 std::vector<std::string>
keys;
133 std::vector<Prompt::Def::Var> vars;
135 for(
const std::string &
key:
keys) {
◆ readVectorVars()
std::vector< Prompt::Def::Var > Prompt::VarHolder::readVectorVars |
( |
const std::vector< std::string > & |
keys | ) |
|
Definition at line 149 of file VarHolder.cxx.
156 std::vector<Prompt::Def::Var> vars;
158 for(
const std::string &
key:
keys) {
◆ registerAllVars()
int Prompt::VarHolder::registerAllVars |
( |
| ) |
|
◆ registerDynamicVar()
Definition at line 41 of file VarHolder.cxx.
46 if(
name ==
v.second) {
52 last_key = std::max<unsigned>(last_key,
v.first);
◆ registerVar()
◆ replaceVar()
bool Prompt::VarHolder::replaceVar |
( |
unsigned |
key, |
|
|
double |
value |
|
) |
| |
|
inline |
◆ m_fVars
◆ m_gPromptVars
VarMap Prompt::VarHolder::m_gPromptVars |
|
private |
◆ m_varEnums
The documentation for this class was generated from the following files: