cgv
Loading...
Searching...
No Matches
cgv::base::factory_registration< T > Struct Template Reference

convenience class to register a factory of the given class type More...

#include <register.h>

Public Member Functions

 factory_registration (const std::string &_created_type_name, const std::string &_options="", bool _is_singleton=false, const std::string &_object_options="")
 this registers an instance of the default factory implementation
 
 factory_registration (const char *item_text, char shortcut, bool is_singleton=false)
 this constructor is only provided for downward compatibility and should not be used anymore.
 

Detailed Description

template<class T>
struct cgv::base::factory_registration< T >

convenience class to register a factory of the given class type

Definition at line 300 of file register.h.

Constructor & Destructor Documentation

◆ factory_registration() [1/2]

template<class T >
cgv::base::factory_registration< T >::factory_registration ( const std::string &  _created_type_name,
const std::string &  _options = "",
bool  _is_singleton = false,
const std::string &  _object_options = "" 
)
inline

this registers an instance of the default factory implementation

parameters:

  • _created_type_name ... name of the type of the instances created by the factory
  • _options ... semicolon separated options used to register the factory. For gui integration these can include assignments to "menu_path" and "shortcut"
  • _is_singleton ... whether the factory can create only one instance
  • _object_options ... options used to register created instances

Definition at line 310 of file register.h.

References cgv::base::register_object().

◆ factory_registration() [2/2]

template<class T >
cgv::base::factory_registration< T >::factory_registration ( const char item_text,
char  shortcut,
bool  is_singleton = false 
)
inline

this constructor is only provided for downward compatibility and should not be used anymore.

Item text and shortcut can be specified in the option string via "menu_path=\"geometry/sphere\";shortcut='Q'".

Definition at line 316 of file register.h.


The documentation for this struct was generated from the following file: