Go to the documentation of this file.
65 #ifndef XSENS_JANITORS_H
66 #define XSENS_JANITORS_H
73 #if defined(__AVR32__)
76 #elif defined(_ADI_COMPILER)
79 #elif defined(__GNUC__) && !defined(HAVE_CDECL)
81 #if defined(__x86_64__)
84 #define __cdecl __attribute__((cdecl))
87 #if !defined(__stdcall)
88 #if defined(__x86_64__)
91 #define __stdcall __attribute__((stdcall))
99 #ifndef NOT_FOR_PUBLIC_RELEASE
368 template <
class T,
typename R =
void>
416 template <
class T,
typename P1,
typename R =
void>
460 #ifndef NOT_FOR_PUBLIC_RELEASE
467 template <
typename ResultType =
void>
513 template <
typename ResultType =
void>
559 template <
class ParamType,
typename ResultType =
void>
605 template <
class ParamType,
typename ResultType =
void>
651 template <
class Param1Type,
class Param2Type,
typename ResultType =
void>
698 template <
class Param1Type,
class Param2Type,
typename ResultType =
void>
745 template <
class T,
class C,
typename R =
void>
804 template <
typename R =
void>
863 template <
class ParamType,
typename ResultType =
void>
867 #ifndef __ANDROID_API__
956 template <
typename T>
978 template <
typename T>
1000 template <
class T,
template <
class>
class DeallocationPolicy>
1143 DeallocationPolicy<ElementType>::Deallocate(
m_target);
1167 template <
class T,
template <
class>
class DeallocationPolicy = JanitorRCDeallocationPolicy_Delete>
~JanitorStdFunc0()
Destructor.
const JanitorFunc2R & operator=(const JanitorFunc2R &)
void disable(void)
Disables the function calling.
std::function< ResultType(void)> t_func_JanitorFunc
A function prototype for a janitor function.
void enable(void)
Enables the memory releasing.
ResultType(__cdecl * t_func_JanitorFunc)(ParamType)
A function prototype for a janitor function.
Reference counting janitor class.
void disable(void)
Disables the reference counting.
void disable(void)
Disables the value restoring.
Class function calling janitor class.
~JanitorDeleteArray()
Destructor.
~JanitorFunc2R()
Destructor.
void disable(void)
Disables the function calling.
ResultType(__cdecl * t_func_JanitorFunc)(void)
A function prototype for a janitor function.
virtual ~JanitorRCDeallocation()
Destructor.
const JanitorFunc1 & operator=(const JanitorFunc1 &)
void addRef(void)
Adds a reference to a reference counter.
Reference counting janitor class.
~JanitorDeleteNull()
Destructor.
const T * operator->() const
void disable(void)
Disables the function calling.
void enable(void)
Enables the function calling.
Log / printf-like function calling janitor class.
friend void swap(JanitorRCDeallocation &first, JanitorRCDeallocation &second)
Swaps the two object's variables.
void setControl(T *control)
Sets the control object.
t_func_JanitorFunc m_funcJF
T ElementType
A type definition for an element type.
Function calling janitor class for function with 1 reference parameter.
JanitorRCFree(T *target=0, bool enabled=true)
Constructor.
const JanitorLogFunc & operator=(const JanitorLogFunc &)
void enable(void)
Enables the log function calling.
~JanitorClassFunc()
Destructor.
ElementType & operator*() const
~JanitorFuncStdCall()
Destructor.
Function calling janitor class for function with 0 parameters.
void enable(void)
Enables the function calling.
t_func_JanitorFunc m_funcJF
~JanitorFunc1R()
Destructor.
t_func_JanitorLogFunc m_funcJF
void disable(void)
Disables the value restoring.
t_func_JanitorFunc m_funcJF
~JanitorRCDeallocationPolicy_Delete()
Destructor.
JanitorRCDeallocation< T, DeallocationPolicy > ThisType
A type definition for this type.
~JanitorRestore()
Destructor.
t_func_JanitorFunc m_funcJF
const JanitorSet & operator=(const JanitorSet &)
t_func_JanitorFuncStdCall m_funcJFSC
void enable(void)
Enables the value restoring.
Reference counting janitor class.
void disable(void)
Disables the log function calling.
void removeRef(void)
Removes a reference from a reference counter.
t_func_JanitorClassFunc m_funcJCF
const T * operator->() const
const JanitorStdFunc0 & operator=(const JanitorStdFunc0 &)
void enable(void)
Enables the function calling.
Class function calling janitor class with a parameter.
Log / printf-like function calling janitor class.
JanitorRCDeallocation(const ThisType &j, bool enabled=true)
Constructor with this type.
void enable(void)
Enables the function calling.
const JanitorClassFuncP1 & operator=(const JanitorClassFuncP1 &)
~JanitorClassFuncP1()
Destructor.
void disable(void)
Disables the function calling.
ElementType * get() const
ResultType(__cdecl * t_func_JanitorFunc)(Param1Type, Param2Type)
A function prototype for a janitor function.
void reset(ElementType *p=0)
Swaps an element type with this type.
void enable(void)
Enables the memory releasing.
const JanitorSimpleLogFunc & operator=(const JanitorSimpleLogFunc &)
void disable(void)
Disables the memory releasing.
~JanitorDelete()
Destructor.
void enable(void)
Enables the function calling.
void disable(void)
Disables the function calling.
~JanitorFunc2()
Destructor.
const JanitorClassFunc & operator=(const JanitorClassFunc &)
void disable(void)
Disables the function calling.
ResultType(__cdecl * t_func_JanitorFunc)(ParamType)
A function prototype for a janitor function.
t_func_JanitorFunc m_funcJF
const JanitorFunc1R & operator=(const JanitorFunc1R &)
JanitorRCDelete(T *target=0, bool enabled=true)
Constructor.
const char * m_functionName
t_func_JanitorFunc m_funcJF
void enable(void)
Enables the memory releasing.
Memory releasing janitor class.
void disable(void)
Disables the function calling.
static void Deallocate(T *p)
Deallocates (frees) a pointer to an object.
~JanitorFree()
Destructor.
Function calling janitor class for std::function with 0 parameters.
const JanitorFuncStdCall & operator=(const JanitorFuncStdCall &)
Function calling janitor class.
~JanitorSimpleLogFunc()
Destructor.
void enable(void)
Enables the reference counting.
const char * m_functionName
void enable(void)
Enables the function calling.
Value restoring janitor class.
Function calling janitor class for function with 2 parameters.
A reference counter memory releasing janitor class.
t_func_JanitorSimpleLogFunc m_funcJF
Memory releasing janitor class.
Function calling janitor class for function with 2 reference parameters.
JanitorRCDeallocation(ElementType *target=0, bool enabled=true)
Constructor with an element type.
Memory releasing janitor class.
A reference counter memory releasing janitor class.
t_func_JanitorClassFunc m_funcJCF
void disable(void)
Disables the memory releasing.
void disable(void)
Disables the log function calling.
~JanitorFunc1()
Destructor.
ResultType(__stdcall * t_func_JanitorFuncStdCall)(ParamType)
A function prototype for a calling janitor function.
const JanitorFunc0 & operator=(const JanitorFunc0 &)
R(T::* t_func_JanitorClassFunc)(P1)
A function prototype for a janitor class.
const JanitorFunc2 & operator=(const JanitorFunc2 &)
~JanitorLogFunc()
Destructor.
void disable(void)
Disables the memory releasing and nulling.
ElementType * operator->() const
void enable(void)
Enables the log function calling.
void disable(void)
Disables the memory releasing.
Memory releasing and nulling janitor class.
R(__cdecl * t_func_JanitorSimpleLogFunc)(const char *, const char *,...)
A function prototype for a janitor simple log function.
void enable(void)
Enable the function calling.
void enable(void)
Enables the function calling.
void swap(JanitorRCDeallocation &other)
Swaps the current object's variables with an other object's variables.
Function calling janitor class for function with 1 parameter.
~JanitorRCDeallocationPolicy_Free()
Destructor.
JanitorRCDeallocation & operator=(const JanitorRCDeallocation &rhs)
Copy the data from rhs.
void disable(void)
Disables the function calling.
void(* PostDeallocateFunc)()
A function prototype for a post deallocation function.
Value restoring janitor class.
R(__cdecl * t_func_JanitorLogFunc)(const char *, const char *,...)
A function prototype for a janitor log function.
ResultType(__cdecl * t_func_JanitorFunc)(Param1Type, Param2Type)
A function prototype for a janitor function.
R(T::* t_func_JanitorClassFunc)(void)
A function prototype for a janitor class.
void disable(void)
Disables the function calling.
~JanitorFunc0()
Destructor.
static void Deallocate(T *p)
Deallocates (deletes) a pointer to an object.
void enable(void)
Enables the function calling.
void enable(void)
Enables the value restoring.
void enable(void)
Enables the memory releasing and nulling.