component_registry.h 662 B

123456789101112131415
  1. #ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPONENT_REGISTRY_H_
  2. #define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPONENT_REGISTRY_H_
  3. #include "dragnn/core/interfaces/component.h"
  4. #include "syntaxnet/registry.h"
  5. // Macro to add a component to the registry. This macro associates a class with
  6. // its class name as a string, so FooComponent would be associated with the
  7. // string "FooComponent".
  8. #define REGISTER_DRAGNN_COMPONENT(component) \
  9. REGISTER_SYNTAXNET_CLASS_COMPONENT(syntaxnet::dragnn::Component, #component, \
  10. component)
  11. #endif // NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPONENT_REGISTRY_H_