|
Enzo
|
#include "Engine/Parameter/Parameter.h"#include "Engine/Parameter/Styles.h"#include "Engine/Parameter/Template.h"#include <any>#include <memory>#include <optional>#include <sstream>#include <stdexcept>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| std::vector< std::string > | enzo::prm::style::splitNames (const std::string &text) |
| Returns the names in a option written as a space separated list. | |
| std::vector< attr::AttributeOwner > | enzo::prm::style::parseOwners (const std::string &text) |
| Returns the attribute owners a option names, e.g. "point vertex". | |
| std::vector< attr::AttributeType > | enzo::prm::style::parseAttributeTypes (const std::string &text) |
| Returns the attribute types a option names, e.g. "float vector". | |
| std::optional< std::string > | enzo::prm::style::getReferencedParameterName (const std::string &text) |
| Returns the name of the parameter a option reads its value from. | |
| void | enzo::prm::style::attachStyle (prm::Template ¶meter, const std::string &styleName) |
| Attaches the style a node.yaml name asks for. | |
| template<typename T > | |
| bool | enzo::prm::style::holds (const std::any &style) |
| Returns whether a style is of a particular kind. | |
| std::string | enzo::prm::style::toString (const std::any &style) |
| Returns the name a style is written under in node.yaml, e.g. "boolIcon". | |
| std::vector< std::shared_ptr< prm::Parameter > > | enzo::prm::style::options (const std::any &style) |
| Returns the options a style exposes to node.yaml. | |
| template<typename Parse > | |
| void | enzo::prm::style::validateOption (const std::string &optionValue, const std::vector< const prm::Template * > ¶meters, Parse parseValue) |
| Checks the value a style option holds. | |
| void | enzo::prm::style::validateOptions (const std::any &style, const std::vector< const prm::Template * > ¶meters) |
| Checks the values a style's options hold. | |
| std::shared_ptr< prm::Parameter > | enzo::prm::style::getOption (const std::any &style, const std::string &name) |
| Returns the option a style exposes under a name, e.g. "scale". | |
Reads and checks a parameter style and the values its options hold. The styles themselves are in Styles.h.
|
inline |
Attaches the style a node.yaml name asks for.
|
inline |
Returns the option a style exposes under a name, e.g. "scale".
|
inline |
Returns the name of the parameter a option reads its value from.
getReferencedParameterName("prm(attachTo)") gives "attachTo", while a literal such as "point vertex" gives nothing.
|
inline |
Returns the options a style exposes to node.yaml.
|
inline |
Returns the attribute types a option names, e.g. "float vector".
|
inline |
Returns the attribute owners a option names, e.g. "point vertex".
|
inline |
Returns the names in a option written as a space separated list.
splitNames("point vertex") gives {"point", "vertex"}.
|
inline |
Returns the name a style is written under in node.yaml, e.g. "boolIcon".
| void enzo::prm::style::validateOption | ( | const std::string & | optionValue, |
| const std::vector< const prm::Template * > & | parameters, | ||
| Parse | parseValue ) |
Checks the value a style option holds.
An option written as prm(name) is checked against every choice the dropdown it names offers.
|
inline |
Checks the values a style's options hold.
| parameters | Every parameter on the node holding the style. |