#include "SimTKcommon/internal/common.h"
#include "SimTKcommon/internal/Array.h"
#include "SimTKcommon/internal/Concretize.h"
#include <complex>
#include <cassert>
Go to the source code of this file.
Namespaces | |
namespace | SimTK |
Classes | |
class | ListBase |
class | ListBase< T * > |
class | ListView |
ListView is a 'dummy' class which is completely interchangeable with List. More... | |
class | List |
Container class with hidden implementation. More... | |
Defines | |
#define | SimTK_LIST_SPECIALIZE(T) |
Functions | |
SimTK_LIST_SPECIALIZE (bool) | |
SimTK_LIST_SPECIALIZE (signed char) | |
SimTK_LIST_SPECIALIZE (char) | |
SimTK_LIST_SPECIALIZE (unsigned char) | |
SimTK_LIST_SPECIALIZE (short) | |
SimTK_LIST_SPECIALIZE (int) | |
SimTK_LIST_SPECIALIZE (long) | |
SimTK_LIST_SPECIALIZE (float) | |
SimTK_LIST_SPECIALIZE (double) | |
SimTK_LIST_SPECIALIZE (std::complex< float >) | |
SimTK_LIST_SPECIALIZE (std::complex< double >) | |
SimTK_LIST_SPECIALIZE (std::complex< long double >) | |
template<class T> | |
int | findFirstOf (const List< T > &l, const T &test) |
If the type T supports an "==" operator, you can instantiate this method to find the first element of an List<T> which matches the supplied test element. | |
template<class T> | |
int | findFirstOf (const ListView< T > &lv, const T &test) |
template<class T> | |
Array< int > | findAllOf (const List< T > &l, const T &test) |
If the type T supports an "==" operator, you can instantiate this method to find the indices of all elements of an List<T> at which the elements match the supplied test element. | |
template<class T> | |
Array< int > | findAllOf (const ListView< T > &lv, const T &test) |
template<class T> | |
bool | contains (const List< T > &l, const T &test) |
If the type T supports an "==" operator, you can instantiate this method to find out if an List<T> contains a particular test element. | |
template<class T> | |
bool | contains (const ListView< T > &lv, const T &test) |
#define SimTK_LIST_SPECIALIZE | ( | T | ) |
Value:
template <> class ListBase< T > : public ArrayBase< T > { \ typedef ArrayBase< T > Base; \ public: \ ListBase() { } \ ListBase(int n) : Base(n) { } \ ListBase(int n, const T& initVal) : Base(n,initVal) { } \ ListBase(int n, const T* initVals): Base(n,initVals) { } \ ListBase(const ListBase& l, int offset, int length) : Base(l,offset,length) { } \ ListBase(ListBase& l, int offset, int length) : Base(l,offset,length) { } \ /* default copy, assignment, destructor; inherit most operators & methods */ \ ListBase& operator+=(const T& x) { Base::operator+=(x); return *this; } \ bool isEmpty(int) const { return false; } \ };