Skip to content
Snippets Groups Projects

Unified interface for attributes

Merged Olivier BICHLER requested to merge unified_params into main
2 files
+ 21
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -42,8 +42,24 @@ constexpr std::size_t size(T (&)[N]) { return N; }
*/
class Attributes {
public:
/**
* @brief Check if the attribute exists.
* @param name Name of the attribute to check.
* @return bool True if the attribute exists, false otherwise.
*/
virtual bool hasAttr(const std::string& name) const = 0;
/**
* @brief Get the (implementation defined) name of the type of an attribute, returned by std::type_info::name.
* @param name Name of the attribute.
* @return std::string Name of the type as returned by std::type_info::name.
*/
virtual std::string getAttrType(const std::string& name) const = 0;
/**
* @brief Get the attribute's name list.
* @return std::vector<std::string> Vector of names of the attributes.
*/
virtual std::vector<std::string> getAttrsName() const = 0;
#ifdef PYBIND
Loading