CppUnit project page | CppUnit home page |
#include <utility>
#include <assert.h>
Go to the source code of this file.
Namespaces | |
namespace | CppTL |
Classes | |
struct | CppTL::Type< T > |
class | CppTL::NonCopyable |
Base class for non copyable class. More... | |
Defines | |
#define | CPPTL_HAS_INT64 1 |
#define | CPPTL_HAS__SNPRINTF 1 |
#define | CPPTL_USE_WIN32_ATOMIC 1 |
#define | CPPTL_USE_WIN32_THREAD 1 |
#define | CPPTL_TYPENAME typename |
CPPTL_TYPENAME is defined as 'typename' if the compiler requires deduced typename in template. | |
#define | CPPTL_STATIC_CONSTANT(type, assignment) enum { assignment } |
CPPTL_STATIC_CONSTANT is defined to declare a static constant in a class struct A { CPPTL_STATIC_CONSTANT( x, 1 ) }; // A::x = 1. | |
#define | CPPTL_TYPE_DEFAULT_ARG(aType) = ::CppTL::Type<aType>() |
CPPTL_NO_VECTOR_ITERATOR_VALUE_TYPE_DEDUCTION is defined if it not possible to deduced the value_type of std::vector<>::iterator (it is a pointer and there is no partial specialization support). | |
#define | CPPTL_AT(container, index) (container).at(index) |
#define | CPPTL_HAS_THREAD 1 |
#define | CPPTL_HAS_THREAD_SAFE_ATOMIC_COUNTER 1 |
#define | CPPTL_API |
#define | CPPTL_JOIN(symbol1, symbol2) _CPPTL_DO_JOIN( symbol1, symbol2 ) |
#define | _CPPTL_DO_JOIN(symbol1, symbol2) _CPPTL_DO_JOIN2( symbol1, symbol2 ) |
#define | _CPPTL_DO_JOIN2(symbol1, symbol2) symbol1##symbol2 |
#define | CPPTL_MAKE_UNIQUE_NAME(prefix) CPPTL_JOIN( prefix, __LINE__ ) |
#define | CPPTL_MIN(a, b) ((a) < (b) ? a : b) |
#define | CPPTL_MAX(a, b) ((a) > (b) ? a : b) |
#define | CPPTL_CHECK_TYPE_COMPLETE(Type) |
#define | CPPTL_ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0])) |
Evaluates to the number of elements in the array. | |
#define | CPPTL_ASSERT_MESSAGE(cond, message) assert( (cond) && message ) |
#define | CPPTL_DEBUG_ASSERT_UNREACHABLE assert( false && "unreachable code" ) |
#define | CPPTL_CHECKED_CAST(TargetType, pointer) ::CppTL::checkedCast( pointer, ::CppTL::Type<TargetType>() ) |
Typedefs | |
typedef __int64 | CppTL::int64_t |
typedef unsigned __int64 | CppTL::uint64_t |
typedef CppTL::int64_t | CppTL::LargestInt |
typedef CppTL::uint64_t | CppTL::LargestUnsignedInt |
typedef unsigned int | CppTL::size_type |
Functions | |
template<class T> | |
void | CppTL::swap (T &left, T &right) |
template<class T> | |
void | CppTL::checkedDelete (T *p) |
template<class T> | |
void | CppTL::checkedArrayDelete (T *p) |
template<class TargetType, class SourceType> | |
TargetType | CppTL::checkedCast (SourceType *pointer, Type< TargetType >) |
#define _CPPTL_DO_JOIN | ( | symbol1, | |||
symbol2 | ) | _CPPTL_DO_JOIN2( symbol1, symbol2 ) |
#define _CPPTL_DO_JOIN2 | ( | symbol1, | |||
symbol2 | ) | symbol1##symbol2 |
#define CPPTL_API |
#define CPPTL_ARRAY_SIZE | ( | array | ) | (sizeof(array)/sizeof((array)[0])) |
Evaluates to the number of elements in the array.
#define CPPTL_ASSERT_MESSAGE | ( | cond, | |||
message | ) | assert( (cond) && message ) |
Referenced by CppTL::DequeIteratorCommonBase::advance(), CppTL::SmallMapIteratorBase< T >::advance(), CppTL::DequeBase::appendPage(), CppTL::Deque< T >::at(), CppTL::Deque< T >::back(), CppTL::checkedCast(), CppTL::SmallMapIteratorBase< T >::computeDistance(), CppTL::ConstCharView::ConstCharView(), CppTL::DequeIteratorCommonBase::decrement(), CppTL::SmallMapIteratorBase< T >::decrement(), CppTL::SmallMapIteratorBase< T >::deref(), CppTL::DequeIteratorBase< T >::deref(), CppTL::SmallMap< Key, Value, PredLess, Allocator >::erase(), CppTL::Deque< T >::erase(), CppTL::Deque< T >::front(), CppTL::DequeIteratorCommonBase::increment(), CppTL::SmallMapIteratorBase< T >::increment(), CppTL::SmallMapIteratorBase< T >::index(), CppTL::Deque< T >::insert(), CppTL::ScopedArray< PointeeType >::operator*(), CppTL::ScopedPtr< PointeeType >::operator*(), CppTL::IntrusivePtr< CppUT::TestInfo >::operator*(), CppTL::ScopedArray< PointeeType >::operator->(), CppTL::ScopedPtr< PointeeType >::operator->(), CppTL::IntrusivePtr< CppUT::TestInfo >::operator->(), CppTL::Deque< T >::pop_back(), CppTL::Deque< T >::pop_front(), and CppTL::DequeBase::prependPage().
#define CPPTL_AT | ( | container, | |||
index | ) | (container).at(index) |
Referenced by CppUT::Message::at(), CppTL::Method::getArgType(), and CppUT::TestSuite::testAt().
#define CPPTL_CHECK_TYPE_COMPLETE | ( | Type | ) |
Value:
{ \ typedef char typeMustBeComplete[ sizeof(Type) ? 1 : -1 ]; \ (void)sizeof(typeMustBeComplete); \ }
Referenced by CppTL::checkedArrayDelete(), and CppTL::checkedDelete().
#define CPPTL_CHECKED_CAST | ( | TargetType, | |||
pointer | ) | ::CppTL::checkedCast( pointer, ::CppTL::Type<TargetType>() ) |
#define CPPTL_DEBUG_ASSERT_UNREACHABLE assert( false && "unreachable code" ) |
#define CPPTL_HAS__SNPRINTF 1 |
#define CPPTL_HAS_INT64 1 |
#define CPPTL_HAS_THREAD 1 |
#define CPPTL_HAS_THREAD_SAFE_ATOMIC_COUNTER 1 |
#define CPPTL_JOIN | ( | symbol1, | |||
symbol2 | ) | _CPPTL_DO_JOIN( symbol1, symbol2 ) |
Joins to symbol after expanding them into string.
Use this macro to join two symbols. Example of usage:
#define MAKE_UNIQUE_NAME(prefix) CPPTL_JOIN( prefix, __LINE__ )
The macro defined in the example concatenate a given prefix with the line number to obtain a 'unique' identifier.
#define CPPTL_MAKE_UNIQUE_NAME | ( | prefix | ) | CPPTL_JOIN( prefix, __LINE__ ) |
Adds the line number to the specified string to create a unique identifier.
prefix | Prefix added to the line number to create a unique identifier. |
#define CPPTL_MAX | ( | a, | |||
b | ) | ((a) > (b) ? a : b) |
Referenced by CppTL::DequeBase::growPageMap().
#define CPPTL_MIN | ( | a, | |||
b | ) | ((a) < (b) ? a : b) |
#define CPPTL_STATIC_CONSTANT | ( | type, | |||
assignment | ) | enum { assignment } |
CPPTL_STATIC_CONSTANT is defined to declare a static constant in a class struct A { CPPTL_STATIC_CONSTANT( x, 1 ) }; // A::x = 1.
#define CPPTL_TYPE_DEFAULT_ARG | ( | aType | ) | = ::CppTL::Type<aType>() |
CPPTL_NO_VECTOR_ITERATOR_VALUE_TYPE_DEDUCTION is defined if it not possible to deduced the value_type of std::vector<>::iterator (it is a pointer and there is no partial specialization support).
CPPTL_NO_TYPE_DEFAULT_ARG is defined if the compiler does not support the following construct: template<class ValueType> void doSomething( CppTL::Type<ValueType> type = CppTL::Type<ValueType>() ); With allow for the following usage: doSomething<int>(); Some compiler can not deduce type correctly or may cause silent linker error (all function instantion for different type being recognized as a single one). If this construct is not supported, the portable call syntax should be use: doSomething( CppTL::Type<int>() );
#define CPPTL_TYPENAME typename |
CPPTL_TYPENAME is defined as 'typename' if the compiler requires deduced typename in template.
Referenced by CppTL::bind1r(), CppTL::bind2(), CppTL::bind2r(), CppTL::bind3(), CppTL::bind3r(), CppTL::bind4(), CppTL::bind4r(), CppTL::bind5(), CppTL::bind5r(), CppTL::bind6(), CppTL::bind6r(), CppUT::checkCustomStringSequenceEqual(), CppUT::checkCustomStringSetEqual(), CppUT::checkSequenceEqual(), CppUT::checkSetEqual(), CppTL::Impl::copy_and_destroy(), CppTL::Impl::copy_backwards_and_destroy(), CppTL::Impl::copy_with_construct(), CppTL::fn0r(), CppTL::fn1(), CppTL::fn1r(), CppTL::fn2(), CppTL::fn2r(), CppTL::fn3(), CppTL::fn3r(), CppTL::fn4(), CppTL::fn4r(), CppTL::fn5(), CppTL::fn5r(), and CppTL::Enum::values().
#define CPPTL_USE_WIN32_ATOMIC 1 |
#define CPPTL_USE_WIN32_THREAD 1 |
hosts this site. |
Send comments to: CppUnit Developers |