Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
13
14namespace 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( &registerAllMyClasses );
28 *
29 * \endcode
30 * \ingroup mrpt_base_grp
31 */
33 {
34 public:
35 /** Read the global description of mrpt::utils::CStartUpClassesRegister */
36 CStartUpClassesRegister(void (*ptr_register_func)() );
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
45 };
46
47
48 } // End of namespace
49} // End of namespace
50
51#endif
A helper class that automatically register at start up a custom function to register all the CObject-...
int do_nothing()
< dummy method to allow introducing dependences and avoid the compiler removing the class in static l...
CStartUpClassesRegister(void(*ptr_register_func)())
Read the global description of mrpt::utils::CStartUpClassesRegister.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 06:31:24 UTC 2023