(between parenthesis : the old one).
s
(object__
) : regular,t
(object_t__
) : base type,e
: enum,f
: callback function.d
(object_
) : core (not instantiable),w
(object
) : wrapped (instantiable).r
(object___
) : regular,l
: with lock (i.e. thread-safe).g
: not resource containing (g
stands for groom),h
: resource containing,p
: placeholder, not resource containing.c
: callback.c
: callback,d
: dynamic, not instantiable,e
: enum,f
: callback function,g
: groom - helper, not resource containing,h
: helper, resource containing,l
: with lock (thread-safe),p
: placeholder - helper, not resource containing,r
: resource containing/related,s
: regular static object,t
: base static type,w
: wrapped dynamic object, instantiable.Objects which size doesn't vary (integer, float…).
sObject
(object__
),tObject
(object_t__
).eEnum
(did not exist as is) ; defined with the qENUM(…)
macro,fFunction
(did not exist as is).Objects which contains only objects of this type are also static objects.
Objects which size varies (a string, for example).
dObject
(object_
),wObject
(object
).Objects which contains dynamic core (not instantiable) objects and/or static objects and/or resource-containing objects (see below) are also dynamic core objects.
The instantiable dynamic objects are mostly based on (and automatically created from) a dynamic core object. The dynamic core objects are used as function/method parameter type, but only the instantiable counterpart of such objects can be instantiated.
Objects which contains or are related to resources which have to be freed/deleted/closed…. (memory, socket, file descriptor, mutex…).
rObject
(object___
) : regular,lObject
(no direct equivalence) : with lock, i.e. thread safe.An object containing an instantiable variable size object is also a resource-containing object.
Objects given to an object/function, which contains only virtual methods ; it's abstract. Such an object has not to be initialized, only be inherited.
cObject
(no direct equivalence).
Objects given to an object/function, which is responsible of his handling. Such an object has not to be initialized, only be instantiated and then given to the proper object/function, in a error-aware environment, that is, wrapped with the qRx
(qRH
, qRB
…) macros, to ensure proper destruction.
hObject
(no direct equivalence).
Objects received as a parameters by a function. Such an object has not to be initialized, nor be instantiated.
gObject
(no direct equivalence).
Example : mtk::gBlocker
.
Objects given to an object/function, which is responsible of his handling. Such an object has not to be initialized, only be instantiated and then given to the proper object/function. It does not contain a resource, so no need of an error-aware environment.
pObject
(no direct equivalence).
Example: csdbnc::pBuffer
.
Apart from the q
prefix, macro defined as equivalent for above objects use the prefix letter of the corresponding object as suffix letter. For macros which act as set of objects, you can also have a final l
for the loose version, that is for the version with the generic row sdr::fRow
.
Example :
qBUNCHd( type, row )
,qBUNCHw( type, row )
,qBUNCHdl( type )
(equivalent to qBUNCHd( type, sdr::fRow )
),qBUNCHwl( type )
(equivalent to qBUNCHw( type, sdr::fRow )
).Some examples for the developer of the Epeios project.
qENUM( Name ) { nConfiguration, nProject, nSetup, nArguments, n_amount, n_Undefined }; const char *GetLabel( eName Name ); eName GetName( const str::dString &Pattern );
#define C( name ) case n##name : return #name; break const char *GetLabel( eName Name ) { switch ( Name ) { C( Configuration ); C( Project ); C( Setup ); C( Arguments ); default: qRFwk(); break; } return NULL; // To avoid a warning. } #undef C namespace { stsfsm::wAutomat NameAutomat_; void FillNameAutomat_( void ) { NameAutomat_.Init(); stsfsm::Fill<eName>( NameAutomat_, n_amount, GetLabel ); } } eName GetName( const str::dString &Pattern ) { return stsfsm::GetId( Pattern, NameAutomat_, n_Undefined, n_amount ); } qGCTOR( ... ) { FillNameAutomat_(); }