The Parameter struct defines a pair name : value.
More...
#include <jmCommon.h>
|
static bool | Exists (const std::vector< Parameter > ¶meters, const std::string &name, const std::string &value="") |
| Searches for a parameter with the given name and value in the parameters. If the value is not specified it searches only for the name. If a parameter is found returns true; otherwise returns false. More...
|
|
static std::string | GetValue (const std::vector< Parameter > ¶meters, const std::string &name, const std::string &defaultValue="") |
| Searches for a parameter with the given name in the parameters. If found returns its value, otherwise returns the given defaultValue. More...
|
|
static int | GetIntValue (const std::vector< Parameter > ¶meters, const std::string &name, int defaultValue=0) |
| Searches for a parameter with the given name in the parameters. If found returns its value converted to integer, otherwise returns the given defaultValue. More...
|
|
static float | GetFloatValue (const std::vector< Parameter > ¶meters, const std::string &name, float defaultValue=0.0) |
| Searches for a parameter with the given name in the parameters. If found returns its value converted to float, otherwise returns the given defaultValue. More...
|
|
|
std::string | name |
| The name of this parameter. More...
|
|
std::string | value |
| The value of this parameter. More...
|
|
int | kind = -1 |
| The paramters kind as defined in JugiMap editor. This value is used at the map loading and has no real purpose. More...
|
|
The Parameter struct defines a pair name : value.
The Parameter struct represents a paramater from JugiMap Editor.
◆ Exists()
bool Exists |
( |
const std::vector< Parameter > & |
parameters, |
|
|
const std::string & |
name, |
|
|
const std::string & |
value = "" |
|
) |
| |
|
static |
Searches for a parameter with the given name and value in the parameters. If the value is not specified it searches only for the name. If a parameter is found returns true; otherwise returns false.
◆ GetValue()
std::string GetValue |
( |
const std::vector< Parameter > & |
parameters, |
|
|
const std::string & |
name, |
|
|
const std::string & |
defaultValue = "" |
|
) |
| |
|
static |
Searches for a parameter with the given name in the parameters. If found returns its value, otherwise returns the given defaultValue.
◆ GetIntValue()
int GetIntValue |
( |
const std::vector< Parameter > & |
parameters, |
|
|
const std::string & |
name, |
|
|
int |
defaultValue = 0 |
|
) |
| |
|
static |
Searches for a parameter with the given name in the parameters. If found returns its value converted to integer, otherwise returns the given defaultValue.
◆ GetFloatValue()
float GetFloatValue |
( |
const std::vector< Parameter > & |
parameters, |
|
|
const std::string & |
name, |
|
|
float |
defaultValue = 0.0 |
|
) |
| |
|
static |
Searches for a parameter with the given name in the parameters. If found returns its value converted to float, otherwise returns the given defaultValue.
◆ name
The name of this parameter.
◆ value
The value of this parameter.
◆ kind
The paramters kind as defined in JugiMap editor. This value is used at the map loading and has no real purpose.
The documentation for this struct was generated from the following files:
- C:/Development/JugiMapProject/JugiMapFRM/framework_c++/jugimap/jmCommon.h
- C:/Development/JugiMapProject/JugiMapFRM/framework_c++/jugimap/jmCommon.cpp