Copyright © 2007-2011, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com
templates.bi | Copyright © 2007-2011, FreeBASIC Extended Library Development Group |
Macros | |
fbext_TypeName | Gets the qualified name of T_, which is often a template type parameter. |
fbext_TypeID | Gets the concatenated name of T_, which is often a template type parameter. |
fbext_TID | Gets the concatenated name of T_, which is often a template type parameter. |
fbext_TemplateID | |
fbext_TDeclare | Declares the template tname_ with targs_. |
fbext_TDefine | Defines the template tname_ with targs_. |
fbext_Instanciate | Fully instanciates the template tname_ with arguments targs_. |
fbext_InstanciateMulti | Fully instanciates the template tname_ with each set of arguments in seq_of_targs_. |
fbext_UnsignedIntegralTypes | A preprocessor sequence of unsigned integral types. |
fbext_SignedIntegralTypes | A preprocessor sequence of signed integral types. |
fbext_IntegralTypes | A preprocessor sequence of integral types. |
fbext_FloatTypes | A preprocessor sequence of floating-point types. |
fbext_NumericTypes | A preprocessor sequence of numeric types. |
# define fbext_TypeName( T_ ) fbextPP_SeqCat(fbextPP_SeqForEachI(fbext_TypeName_I, __, T_))
Gets the qualified name of T_, which is often a template type parameter.
T_ | a template parameter. |
fbext_TypeName is most often used in template declarations and template definitions to transform a template type parameter into an identifier suitable for use in statements such as Dim and in procedure parameter declarations.
For example, fbext_TypeName((MyNamespace)(MyType)) expands to MyNamespace.MyType.
# define fbext_TypeID( T_ ) fbextPP_SeqCat(T_)
Gets the concatenated name of T_, which is often a template type parameter.
T_ | a template parameter. |
fbext_TypeName is used to transform a template type parameter into an identifier suitable for a macro name.
For example, fbext_TypeID((MyNamespace)(MyType)) expands to MyNamespaceMyType.
# define fbext_TID( tname_, targs_ ) fbext_TypeID((tname_) fbextPP_SeqTransform(fbext_TID_O, __, targs_))
Gets the concatenated name of T_, which is often a template type parameter.
tname_ | a template name. |
targs_ | a sequence of one or more template arguments. |
fbext_TID is used to transform a template name and a sequence of template arguments into an identifier suitable for a macro name.
For example, fbext_TID((MyNamespace)(MyType)) expands to MyNamespaceMyType.
# macro fbext_TDeclare( tname_, targs_ )
Declares the template tname_ with targs_.
tname_ | the name of the template. |
targs_ | a sequence of one or more template arguments. |
fbext_TDeclare expands the macro *tname_*##_Declare with each of the elements in targs_ as arguments. No expansion occurs if *tname_*##_Declare is not defined, or if it has already been expanded with the given arguments.
# macro fbext_TDefine( tname_, linkage_, targs_ )
Defines the template tname_ with targs_.
tname_ | the name of the template. |
linkage_ | ”public” or “private” specifying, respectively, external or internal linkage. |
targs_ | a sequence of one or more template arguments. |
fbext_TDefine expands the macro *tname_*##_Define with linkage_ and each of the elements in targs_ as arguments. No expansion occurs if *tname_*##_Define is not defined, or if it has already been expanded with the given arguments.
# macro fbext_Instanciate( tname_, targs_ )
Fully instanciates the template tname_ with arguments targs_.
tname_ | the name of the template to instanciate. |
targs_ | a sequence of one or more template arguments. |
fbext_Instanciate effectively behaves like,
fbext_TDeclare(tname_, targs_) fbext_TDefine(tname_, private, targs_)
# macro fbext_InstanciateMulti( tname_, seq_of_targs_ )
Fully instanciates the template tname_ with each set of arguments in seq_of_targs_.
tname_ | the name of the template to instanciate. |
seq_of_targs_ | a sequence of one or more sequences of one or more template arguments. |
fbext_InstanciateMulti effectively behaves like,
fbext_Instanciate(tname_, fbextPP_SeqElem(0, seq_of_targs)) fbext_Instanciate(tname_, fbextPP_SeqElem(1, seq_of_targs)) ... fbext_Instanciate(tname_, fbextPP_SeqElem(N-1, seq_of_targs))
where N is the number of sequences of template arguments in seq_of_targs.
Gets the qualified name of T_, which is often a template type parameter.
# define fbext_TypeName( T_ ) fbextPP_SeqCat(fbextPP_SeqForEachI(fbext_TypeName_I, __, T_))
Gets the concatenated name of T_, which is often a template type parameter.
# define fbext_TypeID( T_ ) fbextPP_SeqCat(T_)
Gets the concatenated name of T_, which is often a template type parameter.
# define fbext_TID( tname_, targs_ ) fbext_TypeID((tname_) fbextPP_SeqTransform(fbext_TID_O, __, targs_))
# define fbext_TemplateID( tname_, targs_, deftargs_ ) fbext_TemplateID_I( tname_, fbext_GetTArgsWithDefaults__( targs_, deftargs_) )
Declares the template tname_ with targs_.
# macro fbext_TDeclare( tname_, targs_ )
Defines the template tname_ with targs_.
# macro fbext_TDefine( tname_, linkage_, targs_ )
Fully instanciates the template tname_ with arguments targs_.
# macro fbext_Instanciate( tname_, targs_ )
Fully instanciates the template tname_ with each set of arguments in seq_of_targs_.
# macro fbext_InstanciateMulti( tname_, seq_of_targs_ )
A preprocessor sequence of unsigned integral types.
# define fbext_UnsignedIntegralTypes( ) (((ubyte)))(((ushort)))(((uinteger)))(((ulongint)))
A preprocessor sequence of signed integral types.
# define fbext_SignedIntegralTypes( ) (((byte)))(((short)))(((integer)))(((longint)))
A preprocessor sequence of integral types.
# define fbext_IntegralTypes( ) fbext_UnsignedIntegralTypes() fbext_SignedIntegralTypes()
A preprocessor sequence of floating-point types.
# define fbext_FloatTypes( ) (((single)))(((double)))
A preprocessor sequence of numeric types.
# define fbext_NumericTypes( ) fbext_IntegralTypes() fbext_FloatTypes()