Protium
Math and Design Features
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Protium::Design Namespace Reference

Encapsulates design patterns and policies. More...

Classes

struct  ConstructablePrototype
 
struct  DerivedRegister
 
struct  DimensionAdd
 Helper template to add dimensions on quantitites. More...
 
struct  DimensionSubtract
 Helper template to subtract dimensions on quantities. More...
 
class  EmptyType
 Empty class. To be used as header or footer. More...
 
class  FunctionMapped
 
class  FunctionMappedPrototype
 
struct  IndexOf
 Empty Astract Index class. Never Use directly. More...
 
struct  IndexOf< NullType, T >
 The Last element in a list is always NUllType at position -1. More...
 
struct  IndexOf< Typelist< Head, Tail >, T >
 Every item in typelist has index (typelist) + 1. More...
 
struct  IndexOf< Typelist< T, Tail >, T >
 Every Typelist has index of 0. More...
 
struct  IntType
 Maps type to integer. More...
 
struct  NullType
 Emmpty struct. To be used as header or footer. More...
 
struct  Quantity
 Defines a dimensionful quantities. More...
 
class  RefToValue
 Use to have local value that utilizes reference. More...
 
struct  SameType
 Maps to types to a new type. More...
 
struct  SameType< T, T >
 Specialization of SameType for identical types. More...
 
struct  Sequence
 Sequence of types. More...
 
struct  Sequence<>
 Specialization of empty sequence. More...
 
struct  Typelist
 General list of types. Points to Head and Tail. More...
 
struct  TypeType
 Maps type to another type. More...
 
struct  VirtualFactory
 

Typedefs

typedef DimensionSubtract
< velocity, time >::Type 
acceleration
 
typedef DimensionAdd< energy,
time >::Type 
action
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 1 > >::Type 
angle
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 1 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 > >::Type 
charge
 
typedef DimensionSubtract
< charge, time >::Type 
current
 
typedef DimensionSubtract
< scalar, DimensionAdd
< magneticFluxDensity,
DimensionAdd< velocity,
velocity >::Type >::Type >
::Type 
electricFluxDensity
 
typedef DimensionAdd< force,
length >::Type 
energy
 
typedef DimensionSubtract
< DimensionSubtract< scalar,
energy >::Type, energy >::Type 
fermiDimension
 
typedef DimensionAdd
< acceleration, mass >::Type 
force
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 1 >, IntType
< 0 > >::Type 
intensity
 
typedef Sequence< int, IntType
< 0 >, IntType< 1 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 > >::Type 
length
 
typedef DimensionSubtract
< DimensionSubtract< force,
current >::Type, current >
::Type 
magneticFluxDensity
 
typedef Sequence< int, IntType
< 1 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 > >::Type 
mass
 
typedef DimensionAdd< mass,
velocity >::Type 
momentum
 
typedef DimensionSubtract
< scalar, time >::Type 
rate
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 > >::Type 
scalar
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 1 >, IntType< 0 >, IntType
< 0 > >::Type 
temperature
 
typedef Sequence< int, IntType
< 0 >, IntType< 0 >, IntType
< 1 >, IntType< 0 >, IntType
< 0 >, IntType< 0 >, IntType
< 0 > >::Type 
time
 
typedef DimensionSubtract
< length, time >::Type 
velocity
 

Functions

template<class T >
RefToValue< T > ByRef (T &t)
 Helper construct method. More...
 
template<class T , class D1 , class D2 >
Quantity< T, typename
DimensionAdd< D1, D2 >::Type > 
operator* (Quantity< T, D1 > x, Quantity< T, D2 > y)
 Defines dimensionful multiplication. More...
 
template<class T , class D >
Quantity< T, D > operator+ (Quantity< T, D > x, Quantity< T, D > y)
 Defines dimensionful quantity addition. More...
 
template<class T , class D >
Quantity< T, D > operator- (Quantity< T, D > x, Quantity< T, D > y)
 Defines dimensionful quantity subtraction. More...
 
template<class T , class D1 , class D2 >
Quantity< T, typename
DimensionSubtract< D1, D2 >
::Type > 
operator/ (Quantity< T, D1 > x, Quantity< T, D2 > y)
 Defines dimensionful Division. More...
 
bool operator< (const EmptyType &, const EmptyType &)
 Empty types are always equal. More...
 
bool operator== (const EmptyType &, const EmptyType &)
 Empty types are always equal. More...
 
bool operator> (const EmptyType &, const EmptyType &)
 Empty types are always equal. More...
 

Detailed Description

Encapsulates design patterns and policies.

Typedef Documentation

Definition at line 51 of file Dimensions.h.

Definition at line 55 of file Dimensions.h.

Definition at line 45 of file Dimensions.h.

Definition at line 39 of file Dimensions.h.

Definition at line 58 of file Dimensions.h.

Definition at line 54 of file Dimensions.h.

Definition at line 52 of file Dimensions.h.

Definition at line 44 of file Dimensions.h.

Definition at line 41 of file Dimensions.h.

typedef Sequence<int, IntType<1>,IntType<0>,IntType<0>,IntType<0>,IntType<0>,IntType<0>,IntType<0> >::Type Protium::Design::mass

Definition at line 40 of file Dimensions.h.

Definition at line 53 of file Dimensions.h.

Definition at line 49 of file Dimensions.h.

Base dimensions

Definition at line 38 of file Dimensions.h.

Definition at line 43 of file Dimensions.h.

typedef Sequence<int, IntType<0>,IntType<0>,IntType<1>,IntType<0>,IntType<0>,IntType<0>,IntType<0> >::Type Protium::Design::time

Definition at line 42 of file Dimensions.h.

Definition at line 50 of file Dimensions.h.

Function Documentation

template<class T >
RefToValue<T> Protium::Design::ByRef ( T &  t)
inline

Helper construct method.

Definition at line 35 of file RefToValue.h.

template<class T , class D1 , class D2 >
Quantity< T, typename DimensionAdd<D1,D2>::Type > Protium::Design::operator* ( Quantity< T, D1 >  x,
Quantity< T, D2 >  y 
)

Defines dimensionful multiplication.

Definition at line 48 of file Quantities.h.

template<class T , class D >
Quantity<T,D> Protium::Design::operator+ ( Quantity< T, D >  x,
Quantity< T, D >  y 
)

Defines dimensionful quantity addition.

Note
Undefined for unequal dimensions

Definition at line 34 of file Quantities.h.

template<class T , class D >
Quantity<T,D> Protium::Design::operator- ( Quantity< T, D >  x,
Quantity< T, D >  y 
)

Defines dimensionful quantity subtraction.

Note
Undefined for unequal dimensions

Definition at line 42 of file Quantities.h.

template<class T , class D1 , class D2 >
Quantity< T, typename DimensionSubtract<D1,D2>::Type > Protium::Design::operator/ ( Quantity< T, D1 >  x,
Quantity< T, D2 >  y 
)

Defines dimensionful Division.

Definition at line 55 of file Quantities.h.

bool Protium::Design::operator< ( const EmptyType &  ,
const EmptyType &   
)
inline

Empty types are always equal.

Definition at line 17 of file Types.h.

bool Protium::Design::operator== ( const EmptyType &  ,
const EmptyType &   
)
inline

Empty types are always equal.

Definition at line 14 of file Types.h.

bool Protium::Design::operator> ( const EmptyType &  ,
const EmptyType &   
)
inline

Empty types are always equal.

Definition at line 20 of file Types.h.