|
Sen API
Sen Libraries
|
Represents a property. More...
#include <property.h>
Public Member Functions | |
| Property (PropertySpec spec, Private notUsable) | |
| ~Property ()=default | |
| std::string_view | getName () const noexcept |
| The name of the property. | |
| std::string_view | getDescription () const noexcept |
| The documentation of the property. | |
| MemberHash | getId () const noexcept |
| The propety id. | |
| PropertyCategory | getCategory () const noexcept |
| Gets the property category. | |
| ConstTypeHandle | getType () const noexcept |
| Gets the return type of the method (nullptr means void). | |
| TransportMode | getTransportMode () const noexcept |
| Gets the transport mode for this property. | |
| const Method & | getGetterMethod () const noexcept |
| The getter method. | |
| const Method & | getSetterMethod () const noexcept |
| The setter method. | |
| const Event & | getChangeEvent () const noexcept |
| The change notification event. | |
| const std::vector< std::string > & | getTags () const noexcept |
| Any user-defined tags. | |
| bool | getCheckedSet () const noexcept |
| If true, the user will validate sets to the property value. | |
| bool | operator== (const Property &other) const noexcept |
| Compares if it is equivalent to another property. | |
| bool | operator!= (const Property &other) const noexcept |
| Compares if it is not equivalent to another property. | |
| MemberHash | getHash () const noexcept |
| Returns a unique hash for the Property computed at compile time. | |
Static Public Member Functions | |
| static std::shared_ptr< Property > | make (PropertySpec spec) |
| Factory function that validates the spec and creates a property. Throws std::exception if the spec is not valid. | |
| static std::string | makeGetterMethodName (const PropertySpec &spec) |
| Utility function that creates the name of a getter method. Throws std::exception if the spec has an empty name. | |
| static std::string | makeSetterMethodName (const PropertySpec &spec) |
| Utility function that creates the name of a setter method. Throws std::exception if the spec has an empty name. | |
| static std::string | makeChangeNotificationEventName (const PropertySpec &spec) |
| Utility function that creates the name of a change notification event. Throws std::exception if the spec has an empty name. | |
Represents a property.
| sen::Property::Property | ( | PropertySpec | spec, |
| Private | notUsable ) |
|
default |
|
staticnodiscard |
Factory function that validates the spec and creates a property. Throws std::exception if the spec is not valid.
|
nodiscardnoexcept |
The name of the property.
|
nodiscardnoexcept |
The documentation of the property.
|
nodiscardnoexcept |
The propety id.
|
nodiscardnoexcept |
Gets the property category.
|
nodiscardnoexcept |
Gets the return type of the method (nullptr means void).
|
nodiscardnoexcept |
Gets the transport mode for this property.
|
nodiscardnoexcept |
The getter method.
|
nodiscardnoexcept |
The setter method.
|
nodiscardnoexcept |
The change notification event.
|
nodiscardnoexcept |
Any user-defined tags.
|
nodiscardnoexcept |
If true, the user will validate sets to the property value.
|
staticnodiscard |
Utility function that creates the name of a getter method. Throws std::exception if the spec has an empty name.
|
staticnodiscard |
Utility function that creates the name of a setter method. Throws std::exception if the spec has an empty name.
|
staticnodiscard |
Utility function that creates the name of a change notification event. Throws std::exception if the spec has an empty name.
|
nodiscardnoexcept |
Compares if it is equivalent to another property.
|
nodiscardnoexcept |
Compares if it is not equivalent to another property.
|
nodiscardnoexcept |
Returns a unique hash for the Property computed at compile time.