FXGenericTools.h File Reference


Detailed Description

Defines a number of tools useful for generic programming.

Definition in file FXGenericTools.h.

#include "FXString.h"
#include "FXPolicies.h"
#include "FXException.h"
#include "FXPath.h"
#include <typeinfo>
#include <assert.h>

Go to the source code of this file.

Namespaces

namespace  FX
namespace  FX::Generic
namespace  Generic
namespace  FX::Generic::convertiblePrivate
namespace  TL
namespace  FX::Generic::TL
namespace  FX::Generic::TL::numberRangePrivate
namespace  FX::Generic::TL::Private
namespace  FX::Generic::FnFromListPrivate
namespace  ClassTraits
namespace  FX::Generic::ClassTraits
namespace  FX::Generic::TraitsHelper
namespace  FX::Generic::FunctorHelper
namespace  FX::Generic::TL::dynamicAtHelper

Classes

struct  FX::Generic::StaticAssert< true >
struct  FX::Generic::NullType
 A type representing no type (ie; end of list etc). More...
struct  FX::Generic::IntToType< n >
 A small template which maps any int to a type (and thus allows number-based overloading and type specialisation - and thus compile-time determined code generation). More...
struct  FX::Generic::TypeToType< type >
 A small template which maps any type to a lightweight type suitable for overloading eg; functions. More...
struct  FX::Generic::Boolean< v, type >
 A small template whose value is v. Useful for delayed static assertions. More...
struct  FX::Generic::select< v, A, B >
 Selects one of two types based upon a boolean. More...
struct  FX::Generic::select< false, A, B >
struct  FX::Generic::sameType< A, B >
 Returns true if the two types are the same. More...
struct  FX::Generic::sameType< T, T >
struct  FX::Generic::addRef< type >
 Adds a reference indirection unless type already has one. More...
struct  FX::Generic::addRef< type & >
struct  FX::Generic::addRef< void >
struct  FX::Generic::addRef< const void >
struct  FX::Generic::addConstRef< type >
 Ensures a type is a const reference. More...
struct  FX::Generic::addConstRef< type & >
struct  FX::Generic::addConstRef< const type >
struct  FX::Generic::addConstRef< const type & >
struct  FX::Generic::addConstRef< void >
struct  FX::Generic::convertiblePrivate::TwoChar
struct  FX::Generic::convertiblePrivate::impl< to, from >
struct  FX::Generic::convertible< to, from >
 Returns true if from can become to. More...
struct  FX::Generic::convertible< void, T >
struct  FX::Generic::convertible< T, void >
struct  FX::Generic::convertible< void, void >
struct  FX::Generic::lessIndir< ptr >
 Removes if possible a level of indirection from a pointer or reference type. More...
struct  FX::Generic::lessIndir< ptr * >
struct  FX::Generic::lessIndir< const ptr * >
struct  FX::Generic::lessIndir< volatile ptr * >
struct  FX::Generic::lessIndir< const volatile ptr * >
struct  FX::Generic::lessIndir< ptr & >
struct  FX::Generic::lessIndir< const ptr & >
struct  FX::Generic::lessIndir< volatile ptr & >
struct  FX::Generic::lessIndir< const volatile ptr & >
struct  FX::Generic::indirs< type >
 Returns how many levels of indirection this type has eg; int ** is two. More...
struct  FX::Generic::indirs< type & >
struct  FX::Generic::indirs< const type & >
struct  FX::Generic::indirs< volatile type & >
struct  FX::Generic::indirs< const volatile type & >
struct  FX::Generic::indirs< type * >
struct  FX::Generic::indirs< const type * >
struct  FX::Generic::indirs< volatile type * >
struct  FX::Generic::indirs< const volatile type * >
struct  FX::Generic::leastIndir< ptr >
 Removes all levels of indirection from a pointer or reference type. More...
struct  FX::Generic::leastIndir< ptr * >
struct  FX::Generic::leastIndir< const ptr * >
struct  FX::Generic::leastIndir< volatile ptr * >
struct  FX::Generic::leastIndir< const volatile ptr * >
struct  FX::Generic::leastIndir< ptr & >
struct  FX::Generic::leastIndir< const ptr & >
struct  FX::Generic::leastIndir< volatile ptr & >
struct  FX::Generic::leastIndir< const volatile ptr & >
class  FX::Generic::typeInfoBase
 Base class for FX::Generic::typeInfo. More...
struct  FX::Generic::typeInfo< type >
 Enhanced version of std::type_info. More...
class  FX::Generic::ptr< type, ownershipPolicy >
 A policy-based smart pointer. More...
struct  FX::Generic::TL::item< A, B >
 A single item within the list. More...
struct  FX::Generic::TL::create< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >
 Creates a typelist with up to 16 types. More...
struct  FX::Generic::TL::create<>
struct  FX::Generic::TL::length< typelist >
 Determines the length of a typelist. More...
struct  FX::Generic::TL::length< NullType >
struct  FX::Generic::TL::length< item< A, B > >
struct  FX::Generic::TL::at< typelist, idx >
 Returns the type at index idx, returning NullType if out of bounds. More...
struct  FX::Generic::TL::at< item< A, B >, 0 >
struct  FX::Generic::TL::at< item< A, B >, idx >
struct  FX::Generic::TL::atC< typelist, idx >
 Returns the type at index idx, throwing an error if out of bounds. More...
struct  FX::Generic::TL::atC< item< A, B >, 0 >
struct  FX::Generic::TL::atC< item< A, B >, idx >
struct  FX::Generic::TL::find< typelist, type >
 Returns the index of the specified type in the list or -1 if not found. More...
struct  FX::Generic::TL::find< NullType, type >
struct  FX::Generic::TL::find< item< type, next >, type >
struct  FX::Generic::TL::find< item< A, next >, type >
struct  FX::Generic::TL::findC< typelist, type >
 Returns the index of the specified type in the list, throwing an error if not found. More...
struct  FX::Generic::TL::findParent< typelist, type >
 Returns the index of the first parent class of the specified type in the list or -1 if not found. More...
struct  FX::Generic::TL::findParent< NullType, type >
struct  FX::Generic::TL::findParent< item< type, next >, type >
struct  FX::Generic::TL::findParent< item< A, next >, type >
struct  FX::Generic::TL::findParentC< typelist, type >
 Returns the index of the specified type in the list, throwing an error if not found. More...
struct  FX::Generic::TL::append< typelist, type >
 Appends a type or typelist. More...
struct  FX::Generic::TL::append< NullType, NullType >
struct  FX::Generic::TL::append< NullType, type >
struct  FX::Generic::TL::append< NullType, item< A, next > >
struct  FX::Generic::TL::append< item< A, next >, type >
struct  FX::Generic::TL::remove< typelist, type >
 Removes a type from a list. More...
struct  FX::Generic::TL::remove< NullType, type >
struct  FX::Generic::TL::remove< item< type, next >, type >
struct  FX::Generic::TL::remove< item< A, next >, type >
struct  FX::Generic::TL::numberRangePrivate::Impl< no, instance, top >
struct  FX::Generic::TL::numberRangePrivate::Impl< 0, instance, top >
struct  FX::Generic::TL::numberRange< no, instance >
 Creates a typelist composed of types instantiated by a number running from 0 to no. More...
struct  FX::Generic::TL::apply< typelist, instance >
 Applies each type in a typelist to the template instance, returning a typelist. More...
struct  FX::Generic::TL::apply< item< type, next >, instance >
struct  FX::Generic::TL::apply< NullType, instance >
struct  FX::Generic::TL::filter< typelist, filt >
 Reduces from a typelist to another based on a binary predicate. More...
struct  FX::Generic::TL::filter< item< type, next >, filt >
struct  FX::Generic::TL::filter< NullType, filt >
struct  FX::Generic::TL::replicate< no, type >
 Generates a typelist of no copies of a type. More...
struct  FX::Generic::TL::replicate< 0, type >
struct  FX::Generic::TL::instanceHolderH< type >
 Default holder for instanceH. More...
struct  FX::Generic::TL::Private::instanceHHolder< idx, instance >
struct  FX::Generic::TL::instantiateH< typelist, instance, idx >
 Horizontally instantiates a container containing a holder for each item in a typelist. More...
struct  FX::Generic::TL::instantiateH< item< type, next >, instance, idx >
struct  FX::Generic::TL::instantiateH< NullType, instance, idx >
struct  FX::Generic::TL::Private::accessInstantiateH< i, container >
struct  FX::Generic::TL::Private::accessInstantiateH< i, instantiateH< typelist, instance, 0 > >
struct  FX::Generic::TL::Private::accessInstantiateH< i, const instantiateH< typelist, instance, 0 > >
struct  FX::Generic::FnInfo< fn >
 Extracts type information from a function pointer type. More...
struct  FX::Generic::FnInfo< R(O::*)()>
struct  FX::Generic::FnInfo< R(O::*)() const >
struct  FX::Generic::FnInfo< R(*)(void)>
struct  FX::Generic::FnInfo< R(O::*)(P1)>
struct  FX::Generic::FnInfo< R(O::*)(P1) const >
struct  FX::Generic::FnInfo< R(*)(P1)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2) const >
struct  FX::Generic::FnInfo< R(*)(P1, P2)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2, P3)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2, P3) const >
struct  FX::Generic::FnInfo< R(*)(P1, P2, P3)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2, P3, P4)>
struct  FX::Generic::FnInfo< R(O::*)(P1, P2, P3, P4) const >
struct  FX::Generic::FnInfo< R(*)(P1, P2, P3, P4)>
struct  FX::Generic::FnFromListPrivate::impl< list, 0 >
struct  FX::Generic::FnFromListPrivate::impl< list, 1 >
struct  FX::Generic::FnFromListPrivate::impl< list, 2 >
struct  FX::Generic::FnFromListPrivate::impl< list, 3 >
struct  FX::Generic::FnFromListPrivate::impl< list, 4 >
struct  FX::Generic::FnFromList< list >
 Converts a typelist into a function pointer type. More...
struct  FX::Generic::IntegralLists
 A series of typelists of kinds of integral type. More...
struct  FX::Generic::BiggestValue< type, minus >
 Returns the biggest positive or negative value which can be stored in an integral type. More...
struct  FX::Generic::SmallestValue< type, minus >
 Returns the smallest positive or negative value which can be stored in an integral type. More...
struct  FX::Generic::SmallestValue< type, true >
struct  FX::Generic::BiggestValue< float, false >
struct  FX::Generic::BiggestValue< float, true >
struct  FX::Generic::BiggestValue< double, false >
struct  FX::Generic::BiggestValue< double, true >
struct  FX::Generic::SmallestValue< float, false >
struct  FX::Generic::SmallestValue< float, true >
struct  FX::Generic::SmallestValue< double, false >
struct  FX::Generic::SmallestValue< double, true >
struct  FX::Generic::ClassTraits::combine< T1 >
 Combines class traits when specialising a type. More...
struct  FX::Generic::ClassTraits::has< type >
 Permits you to specify qualities of a type. More...
struct  FX::Generic::TraitsHelper::isVoidI< par >
struct  FX::Generic::TraitsHelper::isVoidI< void >
struct  FX::Generic::TraitsHelper::polyA< par >
struct  FX::Generic::TraitsHelper::polyB< par >
struct  FX::Generic::TraitsHelper::isPolymorphicI< isComplex, par >
struct  FX::Generic::TraitsHelper::isPolymorphicI< true, par >
class  FX::Generic::TraitsBasic< type >
struct  FX::Generic::TraitsBasic< type >::isVoidI< par >
struct  FX::Generic::TraitsBasic< type >::isPtrI< par >
struct  FX::Generic::TraitsBasic< type >::isPtrI< par * >
struct  FX::Generic::TraitsBasic< type >::isRefI< par >
struct  FX::Generic::TraitsBasic< type >::isRefI< par & >
struct  FX::Generic::TraitsBasic< type >::isArrayI< par >
struct  FX::Generic::TraitsBasic< type >::isArrayI< T[len]>
struct  FX::Generic::TraitsBasic< type >::isArrayI< T const [len]>
struct  FX::Generic::TraitsBasic< type >::isArrayI< T volatile[len]>
struct  FX::Generic::TraitsBasic< type >::isArrayI< T const volatile[len]>
struct  FX::Generic::TraitsBasic< type >::isConstI< par >
struct  FX::Generic::TraitsBasic< type >::isConstI< const par >
struct  FX::Generic::TraitsBasic< type >::isVolatileI< par >
struct  FX::Generic::TraitsBasic< type >::isVolatileI< volatile par >
struct  FX::Generic::TraitsBasic< type >::addConstI< wantConst, par >
struct  FX::Generic::TraitsBasic< type >::addConstI< true, par >
class  FX::Generic::Traits< type >
 Determines qualities of a type via introspection. More...
struct  FX::Generic::FunctorHelper::ImplBaseBase< parslist >
struct  FX::Generic::FunctorHelper::ImplBaseOp< parslist, 0 >
struct  FX::Generic::FunctorHelper::ImplBaseOp< parslist, 1 >
struct  FX::Generic::FunctorHelper::ImplBaseOp< parslist, 2 >
struct  FX::Generic::FunctorHelper::ImplBaseOp< parslist, 3 >
struct  FX::Generic::FunctorHelper::ImplBaseOp< parslist, 4 >
class  FX::Generic::FunctorHelper::ImplFn< parentfunctor, fn >
class  FX::Generic::FunctorHelper::ImplMemFn< parentfunctor, obj, fn >
class  FX::Generic::Functor< parslist >
 Represents a callable API. More...
struct  FX::Generic::Functor< parslist >::void_
class  FX::Generic::BoundFunctorV
 A call to a specific API with specific arguments, throwing away the return. More...
class  FX::Generic::BoundFunctor< parslist >
 A call to a specific API with specific arguments. More...
struct  FX::Generic::TL::dynamicAtHelper::Impl< fnspeclist, typelist, instance >
struct  FX::Generic::TL::dynamicAt< typelist, instance >
 Assembles code to call some templated code with the type from a typelist. More...
struct  FX::Generic::MapBools< len >
 Mapper of C++ bools to a bitfield. More...
class  FX::Generic::DoUndo< obj, doaddr, undoaddr >
 Performs an action on construction and another action on destruction. More...
class  FX::Generic::DoUndo< void, doaddr, undoaddr >
class  FX::Generic::DoUndo< NullType, NullType, NullType >
class  FX::FXUnicodify< fastlen >
 Converts a UTF-8 format FX::FXString into a unicode string suitable for the host operating system. More...

Defines

#define FXSTATIC_ASSERT2(expr, msg)
#define FXSTATIC_ASSERT(expr, msg)
#define FXTYPELIST1(P1)
#define FXTYPELIST2(P1, P2)
#define FXTYPELIST3(P1, P2, P3)
#define FXTYPELIST4(P1, P2, P3, P4)
#define FXTYPELIST5(P1, P2, P3, P4, P5)
#define FXTYPELIST6(P1, P2, P3, P4, P5, P6)
#define FXTYPELIST7(P1, P2, P3, P4, P5, P6, P7)
#define FXTYPELIST8(P1, P2, P3, P4, P5, P6, P7, P8)
#define FXTYPELIST9(P1, P2, P3, P4, P5, P6, P7, P8, P9)
#define FXTYPELIST10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)
#define FXTYPELIST11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)
#define FXTYPELIST12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)
#define FXTYPELIST13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)
#define FXTYPELIST14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)
#define FXTYPELIST15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)
#define FXTYPELIST16(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)
#define FXAutoPtr

Typedefs

typedef std::type_info FX::Generic::type_info

Functions

template<int i, class container>
Private::accessInstantiateH<
i, container >::IdxType & 
FX::Generic::TL::instance (container &c)
BoundFunctor * FX::Generic::BindFunctorN (FX::Generic::Functor &functor[, par1[, par2...]])
BoundFunctor FX::Generic::BindObj (obj &, memfunctptr[, par1[, par2...]])
BoundFunctor FX::Generic::BindObjN (obj &, memfunctptr[, par1[, par2...]])

Variables

BoundFunctor FX::Generic::BindFunctor (FX::Generic::Functor &functor[, par1[, par2...]])
BoundFunctor FX::Generic::BindFunc (functptr[, par1[, par2...]])
BoundFunctor FX::Generic::BindFuncN (functptr[, par1[, par2...]])


(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:30 2009 for TnFOX by doxygen v1.4.7