Main MRPT website
>
C++ reference for MRPT 1.3.2
mrpt
utils
CStartUpClassesRegister.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| http://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2015, Individual contributors, see AUTHORS file |
6
| See: http://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See details in http://www.mrpt.org/License |
8
+---------------------------------------------------------------------------+ */
9
#ifndef CStartUpClassesRegister_H
10
#define CStartUpClassesRegister_H
11
12
#include <
mrpt/base/link_pragmas.h
>
13
14
namespace
mrpt
15
{
16
namespace
utils
17
{
18
/** A helper class that automatically register at start up a custom function to register all the CObject-derived classes in a given MRPT library or user application.
19
* Usage:
20
* \code
21
* void registerAllMyClasses()
22
* {
23
* registerClass(CLASS_ID( CMyClass1 ) );
24
* ...
25
* }
26
*
27
* CStartUpClassesRegister doReg( ®isterAllMyClasses );
28
*
29
* \endcode
30
* \ingroup mrpt_base_grp
31
*/
32
class
BASE_IMPEXP
CStartUpClassesRegister
33
{
34
public
:
35
/** Read the global description of mrpt::utils::CStartUpClassesRegister */
36
CStartUpClassesRegister
(
void
(*ptr_register_func)() );
37
~
CStartUpClassesRegister
();
38
39
int
do_nothing();
//!<< dummy method to allow introducing dependences and avoid the compiler removing the class in static linking
40
41
private
:
42
void (*m_ptr_register_func)();
//!< An internal copy of the functor.
43
44
int
m_dummy_var
;
45
};
46
47
48
}
// End of namespace
49
}
// End of namespace
50
51
#endif
BASE_IMPEXP
#define BASE_IMPEXP
Definition:
maps/CColouredPointsMap.h:90
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CParticleFilter.h:16
link_pragmas.h
mrpt::utils::CStartUpClassesRegister
A helper class that automatically register at start up a custom function to register all the CObject-...
Definition:
CStartUpClassesRegister.h:32
mrpt::utils::CStartUpClassesRegister::m_dummy_var
int m_dummy_var
Definition:
CStartUpClassesRegister.h:44
Page generated by
Doxygen 1.8.12
for MRPT 1.3.2 SVN: at Thu Nov 10 13:46:27 UTC 2016