typetrait.3bobcat

Langue: en

Version: 346424 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

NAME

FBB::TypeTrait - shortdesc

SYNOPSIS

#include <bobcat/typetrait>

DESCRIPTION

FBB::TypeTrait is a traits class. It does not define any member functions or data members, but only types. It can be used to determine the basic type and other characteristics of (const) plain, (const) pointer or (const) reference types. It is used, e.g., by the FBB::FnWrap* family of template classes and was designed after Alexandrescu's (2001) TypeTraits template class.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

TYPE

o
Plain: the plain type of any const or non-const plain, pointer, lvalue- or rvalue-reference type.

BOOL VALUES

o
isPointer: true if the template type argument represents a pointer type, false otherwise.
o
isConst: true if the template type argument represents a const type, false otherwise.
o
isRef: true if the template type argument represents an lvalue reference type, false otherwise.
o
isR_Ref: true if the template type argument represents a rvalue reference type, false otherwise.

EXAMPLE

The following example shows a fragment of the code used in the FBB::FnWrap1 class determining the basic type of its Type template parameter:

 
     #include <bobcat/typetrait>
     ...
     template <typename Type, typename ReturnType = void>
     class FnWrap1
     {
         ...
         public:
             typedef typename TypeTrait<Type>::Plain  argument_type;
         ...
     };
         
 
The above code could have used TypeTrait<Type>::isPointer to determine whether Type actually represents a pointer type.

FILES

bobcat/typetrait - defines the class interface

SEE ALSO

bobcat(7)
Alexandrescu A. (2001) Modern C++ Design, Addison-Wesley, Boston.

BUGS

None Reported.

DISTRIBUTION FILES

o
bobcat_2.08.01-x.dsc: detached signature;
o
bobcat_2.08.01-x.tar.gz: source archive;
o
bobcat_2.08.01-x_i386.changes: change log;
o
libbobcat1_2.08.01-x_*.deb: debian package holding the libraries;
o
libbobcat1-dev_2.08.01-x_*.deb: debian package holding the libraries, headers and manual pages;
o
http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).