Skip to content
Snippets Groups Projects
Commit 637f1dd8 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

register component accessors in value component

parent 8c7cc855
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -147,9 +147,17 @@ public: ...@@ -147,9 +147,17 @@ public:
} }
   
static void registerComponent ( ) { static void registerComponent ( ) {
std::array < std::string, 0 > names; std::array < std::string, 0 > emptyNames;
ComponentType & ( Derived::* method ) ( ) = & Component < Derived, ComponentType, component::Value, ComponentName >::get; std::array < std::string, 1 > elementNames = { { "element" } };
abstraction::AlgorithmRegistry::registerMethod < ComponentName > ( method, "get", names );
ComponentType & ( Derived::* getMethod ) ( ) = & Component < Derived, ComponentType, component::Value, ComponentName >::get;
abstraction::AlgorithmRegistry::registerMethod < ComponentName > ( getMethod, "get", emptyNames );
const ComponentType & ( Derived::* constGetMethod ) ( ) const = & Component < Derived, ComponentType, component::Value, ComponentName >::get;
abstraction::AlgorithmRegistry::registerMethod < ComponentName > ( constGetMethod, "get", emptyNames );
bool ( Derived::* setMethod ) ( ComponentType ) = & Component < Derived, ComponentType, component::Value, ComponentName >::set;
abstraction::AlgorithmRegistry::registerMethod < ComponentName > ( setMethod, "set", elementNames );
} }
   
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment