Class options#
Defined in File options.h
Nested Relationships#
Nested Types#
Class Documentation#
-
class options#
Class used to control the different options.
A class to control the different options of f3d. See the README_libf3d.md for the full listing of options
Constructors
-
options()#
Default/Copy/move constructors/operators.
-
~options()#
Default/Copy/move constructors/operators.
Setters
-
options &set(const std::string &name, const std::vector<int> &values)#
Setters for all supported types.
-
options &set(const std::string &name, const std::vector<double> &values)#
Setters for all supported types.
Reference Getters
-
void get(const std::string &name, bool &value) const#
Copy the option value into the provided reference, for all supported types.
-
void get(const std::string &name, int &value) const#
Copy the option value into the provided reference, for all supported types.
-
void get(const std::string &name, double &value) const#
Copy the option value into the provided reference, for all supported types.
-
void get(const std::string &name, std::string &value) const#
Copy the option value into the provided reference, for all supported types.
-
void get(const std::string &name, std::vector<int> &value) const#
Copy the option value into the provided reference, for all supported types.
-
void get(const std::string &name, std::vector<double> &value) const#
Copy the option value into the provided reference, for all supported types.
Explicit Copy Getters
-
bool getAsBool(const std::string &name) const#
Explicit getters for all supported types.
-
int getAsInt(const std::string &name) const#
Explicit getters for all supported types.
-
double getAsDouble(const std::string &name) const#
Explicit getters for all supported types.
-
std::string getAsString(const std::string &name) const#
Explicit getters for all supported types.
-
std::vector<int> getAsIntVector(const std::string &name) const#
Explicit getters for all supported types.
-
std::vector<double> getAsDoubleVector(const std::string &name) const#
Explicit getters for all supported types.
Explicit Reference Getters
-
bool &getAsBoolRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
-
int &getAsIntRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
-
double &getAsDoubleRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
-
std::string &getAsStringRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
-
std::vector<int> &getAsIntVectorRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
-
std::vector<double> &getAsDoubleVectorRef(const std::string &name)#
Explicit getters to actual reference to the options variable, for all supported types. Modifying the returned reference will modify the option. Throw an options::incompatible_exception if the type is not compatible with the option. Throw an options::inexistent_exception if option does not exist.
Public Functions
-
bool isSame(const options &other, const std::string &name) const#
Compare an option between this and a provided other. Return true is they are the same value, false otherwise. Throw an options::inexistent_exception if option does not exist.
-
options ©(const options &other, const std::string &name)#
Copy the value of an option from this to the provided other. Throw an options::inexistent_exception if option does not exist.
-
std::vector<std::string> getNames()#
Get all available option names.
-
options()#