1 #ifndef SimTK_SimTKCOMMON_COMMON_H_ 2 #define SimTK_SimTKCOMMON_COMMON_H_ 104 #ifndef SimTK_DEFAULT_PRECISION 105 # define SimTK_DEFAULT_PRECISION 2 108 #if (SimTK_DEFAULT_PRECISION == 1) 111 #elif (SimTK_DEFAULT_PRECISION == 2) 115 #error ILLEGAL VALUE FOR DEFAULT PRECISION 119 #if defined(__cplusplus) 121 #define SimTK_DEBUG(s) std::printf("DBG: " s) 122 #define SimTK_DEBUG1(s,a1) std::printf("DBG: " s,a1) 123 #define SimTK_DEBUG2(s,a1,a2) std::printf("DBG: " s,a1,a2) 124 #define SimTK_DEBUG3(s,a1,a2,a3) std::printf("DBG: " s,a1,a2,a3) 125 #define SimTK_DEBUG4(s,a1,a2,a3,a4) std::printf("DBG: " s,a1,a2,a3,a4) 128 #define SimTK_DEBUG(s) printf("DBG: " s) 129 #define SimTK_DEBUG1(s,a1) printf("DBG: " s,a1) 130 #define SimTK_DEBUG2(s,a1,a2) printf("DBG: " s,a1,a2) 131 #define SimTK_DEBUG3(s,a1,a2,a3) printf("DBG: " s,a1,a2,a3) 132 #define SimTK_DEBUG4(s,a1,a2,a3,a4) printf("DBG: " s,a1,a2,a3,a4) 135 #define SimTK_DEBUG(s) 136 #define SimTK_DEBUG1(s,a1) 137 #define SimTK_DEBUG2(s,a1,a2) 138 #define SimTK_DEBUG3(s,a1,a2,a3) 139 #define SimTK_DEBUG4(s,a1,a2,a3,a4) 164 #pragma warning(disable:4231) 165 #pragma warning(disable:4251) 166 #pragma warning(disable:4275) 167 #pragma warning(disable:4345) 178 #ifndef HAVE_STRUCT_TIMESPEC 179 #define HAVE_STRUCT_TIMESPEC 1 188 #if defined(SimTK_SimTKCOMMON_BUILDING_SHARED_LIBRARY) 190 #define SimTK_SimTKCOMMON_EXPORT __declspec(dllexport) 192 #pragma warning(disable:4661) 194 #define SimTK_SimTKCOMMON_EXPORT 196 #elif defined(SimTK_SimTKCOMMON_BUILDING_STATIC_LIBRARY) || defined(SimTK_USE_STATIC_LIBRARIES) 197 #define SimTK_SimTKCOMMON_EXPORT 200 #define SimTK_SimTKCOMMON_EXPORT __declspec(dllimport) 202 #define SimTK_SimTKCOMMON_EXPORT 224 #define SimTK_SimTKCOMMON_EXPORT // Linux, Mac 230 #if defined(__cplusplus) 242 #if defined(__cplusplus) 250 #if defined(__cplusplus) 267 #define SimTK_FORCE_INLINE __forceinline 269 #define SimTK_FORCE_INLINE __attribute__((always_inline)) inline 273 #if defined(_MSC_VER) && _MSC_VER < 1900 274 #define NOEXCEPT_11 throw() 276 #define NOEXCEPT_11 noexcept 282 #if __cplusplus >= 201402L 284 #define DEPRECATED_14(MSG) [[deprecated(MSG)]] 287 #define DEPRECATED_14(MSG) __declspec(deprecated("DEPRECATED: " MSG)) 289 #define DEPRECATED_14(MSG) __attribute__((deprecated(MSG))) 292 #define DEPRECATED_14(MSG) 297 #define OVERRIDE_11 override 298 #define FINAL_11 final 312 inline bool canStoreInInt(
unsigned int u) {
return (
unsigned int)(int(u)) == u;}
314 inline bool canStoreInInt(
unsigned long u) {
return (
unsigned long)(int(u)) == u;}
316 inline bool canStoreInInt(
unsigned long long u) {
return (
unsigned long long)(int(u)) == u;}
339 inline bool isSizeInRange(
signed char sz,
signed char mx){
return 0<=sz&&sz<=mx;}
343 inline bool isSizeInRange(
long long sz,
long long mx){
return 0<=sz&&sz<=mx;}
344 inline bool isSizeInRange(
unsigned char sz,
unsigned char mx){
return sz<=mx;}
345 inline bool isSizeInRange(
unsigned short sz,
unsigned short mx){
return sz<=mx;}
347 inline bool isSizeInRange(
unsigned long sz,
unsigned long mx){
return sz<=mx;}
348 inline bool isSizeInRange(
unsigned long long sz,
unsigned long long mx){
return sz<=mx;}
367 inline bool isIndexInRange(
unsigned long long ix,
unsigned long long sz){
return ix<sz;}
426 #define SimTK_DEFINE_UNIQUE_INDEX_TYPE(NAME) \ 427 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(,,,NAME) \ 428 static const NAME Invalid ## NAME; 432 #define SimTK_DEFINE_AND_EXPORT_UNIQUE_INDEX_TYPE(EXPORT,NAME) \ 433 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(EXPORT,,,NAME) \ 434 static const NAME Invalid ## NAME; 437 #define SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE(PARENT,NAME) \ 438 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(,PARENT,::,NAME) 442 #define SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(EXPORT,PARENT,SEP,NAME) \ 443 class EXPORT NAME { \ 446 NAME() : ix(SimTK::InvalidIndex) { } \ 447 explicit NAME(int i) : ix(i) {assert(i>=0 || i==SimTK::InvalidIndex);} \ 448 explicit NAME(long l): ix((int)l) {assert(SimTK::canStoreInNonnegativeInt(l));} \ 449 explicit NAME(long long l): ix((int)l) {assert(SimTK::canStoreInNonnegativeInt(l));} \ 450 explicit NAME(unsigned int u) : ix((int)u) {assert(SimTK::canStoreInInt(u));} \ 451 explicit NAME(unsigned long ul) : ix((int)ul) {assert(SimTK::canStoreInInt(ul));} \ 452 explicit NAME(unsigned long long ul) : ix((int)ul) {assert(SimTK::canStoreInInt(ul));} \ 453 operator int() const {return ix;} \ 454 bool isValid() const {return ix>=0;} \ 455 bool isValidExtended() const {return ix>=-1;} \ 456 void invalidate(){clear();} \ 457 void clear(){ix=SimTK::InvalidIndex;} \ 459 bool operator==(int i) const {assert(isValidExtended() && isValidExtended(i)); return ix==i;} \ 460 bool operator==(short s) const{assert(isValidExtended() && isValidExtended(s)); return ix==(int)s;} \ 461 bool operator==(long l) const {assert(isValidExtended() && isValidExtended(l)); return ix==(int)l;} \ 462 bool operator==(long long l) const {assert(isValidExtended() && isValidExtended(l)); return ix==(int)l;} \ 463 bool operator==(unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix==(int)u;} \ 464 bool operator==(unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix==(int)us;} \ 465 bool operator==(unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix==(int)ul;} \ 466 bool operator==(unsigned long long ul) const {assert(isValidExtended() && isValid(ul)); return ix==(int)ul;} \ 467 bool operator!=(int i) const {return !operator==(i);} \ 468 bool operator!=(short s) const {return !operator==(s);} \ 469 bool operator!=(long l) const {return !operator==(l);} \ 470 bool operator!=(long long l) const {return !operator==(l);} \ 471 bool operator!=(unsigned int u) const {return !operator==(u);} \ 472 bool operator!=(unsigned long ul) const {return !operator==(ul);} \ 473 bool operator!=(unsigned long long ul) const {return !operator==(ul);} \ 475 bool operator< (int i) const {assert(isValidExtended() && isValidExtended(i)); return ix<i;} \ 476 bool operator< (short s) const{assert(isValidExtended() && isValidExtended(s)); return ix<(int)s;} \ 477 bool operator< (long l) const {assert(isValidExtended() && isValidExtended(l)); return ix<(int)l;} \ 478 bool operator< (long long l) const {assert(isValidExtended() && isValidExtended(l)); return ix<(int)l;} \ 479 bool operator< (unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix<(int)u;} \ 480 bool operator< (unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix<(int)us;} \ 481 bool operator< (unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix<(int)ul;} \ 482 bool operator< (unsigned long long ul) const {assert(isValidExtended() && isValid(ul)); return ix<(int)ul;} \ 483 bool operator>=(int i) const {return !operator<(i);} \ 484 bool operator>=(short s) const {return !operator<(s);} \ 485 bool operator>=(long l) const {return !operator<(l);} \ 486 bool operator>=(long long l) const {return !operator<(l);} \ 487 bool operator>=(unsigned int u) const {return !operator<(u);} \ 488 bool operator>=(unsigned short us)const {return !operator<(us);} \ 489 bool operator>=(unsigned long ul) const {return !operator<(ul);} \ 490 bool operator>=(unsigned long long ul) const {return !operator<(ul);} \ 492 bool operator> (int i) const {assert(isValidExtended() && isValidExtended(i)); return ix>i;} \ 493 bool operator> (short s) const{assert(isValidExtended() && isValidExtended(s)); return ix>(int)s;} \ 494 bool operator> (long l) const {assert(isValidExtended() && isValidExtended(l)); return ix>(int)l;} \ 495 bool operator> (long long l) const {assert(isValidExtended() && isValidExtended(l)); return ix>(int)l;} \ 496 bool operator> (unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix>(int)u;} \ 497 bool operator> (unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix>(int)us;} \ 498 bool operator> (unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix>(int)ul;} \ 499 bool operator> (unsigned long long ul) const {assert(isValidExtended() && isValid(ul)); return ix>(int)ul;} \ 500 bool operator<=(int i) const {return !operator>(i);} \ 501 bool operator<=(short s) const {return !operator>(s);} \ 502 bool operator<=(long l) const {return !operator>(l);} \ 503 bool operator<=(long long l) const {return !operator>(l);} \ 504 bool operator<=(unsigned int u) const {return !operator>(u);} \ 505 bool operator<=(unsigned short us)const {return !operator>(us);} \ 506 bool operator<=(unsigned long ul) const {return !operator>(ul);} \ 507 bool operator<=(unsigned long long ul) const {return !operator>(ul);} \ 509 const NAME& operator++() {assert(isValid()); ++ix; return *this;} \ 510 NAME operator++(int) {assert(isValid()); ++ix; return NAME(ix-1);} \ 511 const NAME& operator--() {assert(isValid()); --ix; return *this;} \ 512 NAME operator--(int) {assert(isValid()); --ix; return NAME(ix+1);} \ 513 NAME next() const {assert(isValid()); return NAME(ix+1);} \ 514 NAME prev() const {assert(isValid()); return NAME(ix-1);} \ 516 NAME& operator+=(int i) {assert(isValid() && isValidExtended(ix+i)); ix+=i; return *this;} \ 517 NAME& operator-=(int i) {assert(isValid() && isValidExtended(ix-i)); ix-=i; return *this;} \ 518 NAME& operator+=(short s){assert(isValid() && SimTK::canStoreInInt(s) && isValidExtended(ix+(int)s)); ix+=(int)s; return *this;} \ 519 NAME& operator-=(short s){assert(isValid() && SimTK::canStoreInInt(s) && isValidExtended(ix-(int)s)); ix-=(int)s; return *this;} \ 520 NAME& operator+=(long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix+(int)l)); ix+=(int)l; return *this;} \ 521 NAME& operator-=(long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix-(int)l)); ix-=(int)l; return *this;} \ 522 NAME& operator+=(long long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix+(int)l)); ix+=(int)l; return *this;} \ 523 NAME& operator-=(long long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix-(int)l)); ix-=(int)l; return *this;} \ 524 NAME& operator+=(unsigned int u) {assert(isValid()&& SimTK::canStoreInInt(u) && isValid(ix+(int)u)); ix+=(int)u; return *this;} \ 525 NAME& operator-=(unsigned int u) {assert(isValid()&& SimTK::canStoreInInt(u) && isValidExtended(ix-(int)u)); ix-=(int)u; return *this;} \ 526 NAME& operator+=(unsigned short us){assert(isValid()&& SimTK::canStoreInInt(us) && isValid(ix+(int)us)); ix+=(int)us; return *this;} \ 527 NAME& operator-=(unsigned short us){assert(isValid()&& SimTK::canStoreInInt(us) && isValidExtended(ix-(int)us)); ix-=(int)us; return *this;} \ 528 NAME& operator+=(unsigned long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValid(ix+(int)ul)); ix+=(int)ul; return *this;} \ 529 NAME& operator-=(unsigned long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValidExtended(ix-(int)ul)); ix-=(int)ul; return *this;} \ 530 NAME& operator+=(unsigned long long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValid(ix+(int)ul)); ix+=(int)ul; return *this;} \ 531 NAME& operator-=(unsigned long long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValidExtended(ix-(int)ul)); ix-=(int)ul; return *this;} \ 533 static const NAME& Invalid() {static const NAME invalid; return invalid;} \ 534 static bool isValid(int i) {return i>=0;} \ 535 static bool isValid(short s){return s>=0;} \ 536 static bool isValid(long l) {return SimTK::canStoreInNonnegativeInt(l);} \ 537 static bool isValid(long long l) {return SimTK::canStoreInNonnegativeInt(l);} \ 538 static bool isValid(unsigned int u) {return SimTK::canStoreInInt(u);} \ 539 static bool isValid(unsigned short) {return true;} \ 540 static bool isValid(unsigned long ul) {return SimTK::canStoreInInt(ul);} \ 541 static bool isValid(unsigned long long ul) {return SimTK::canStoreInInt(ul);} \ 542 static bool isValidExtended(int i) {return i>=-1;} \ 543 static bool isValidExtended(short s){return s>=-1;} \ 544 static bool isValidExtended(long l) {return SimTK::canStoreInInt(l) && l>=-1;} \ 545 static bool isValidExtended(long long l) {return SimTK::canStoreInInt(l) && l>=-1;} \ 547 typedef int size_type; \ 548 typedef int difference_type; \ 549 static size_type max_size() {return std::numeric_limits<int>::max();} \ 559 #define SimTK_DYNAMIC_CAST_DEBUG dynamic_cast // safe but slow 561 #define SimTK_DYNAMIC_CAST_DEBUG static_cast // unsafe but fast 567 #define SimTK_DOWNCAST(Derived,Parent) \ 568 static bool isA(const Parent& p) \ 569 { return dynamic_cast<const Derived*>(&p) != 0; } \ 570 static const Derived& downcast(const Parent& p) \ 571 { return SimTK_DYNAMIC_CAST_DEBUG<const Derived&>(p); } \ 572 static Derived& updDowncast(Parent& p) \ 573 { return SimTK_DYNAMIC_CAST_DEBUG<Derived&>(p); } \ 574 static Derived& downcast(Parent& p) \ 575 { return SimTK_DYNAMIC_CAST_DEBUG<Derived&>(p); } 579 #define SimTK_DOWNCAST2(Derived,Helper,Parent) \ 580 static bool isA(const Parent& p) \ 581 { return Helper::isA(p); } \ 582 static const Derived& downcast(const Parent& p) \ 583 { return static_cast<const Derived&>(Helper::downcast(p)); } \ 584 static Derived& updDowncast(Parent& p) \ 585 { return static_cast<Derived&>(Helper::downcast(p)); } \ 586 static Derived& downcast(Parent& p) \ 587 { return static_cast<Derived&>(Helper::downcast(p)); } 593 #define SimTK_PIMPL_DOWNCAST(Derived, Parent) \ 594 static bool isInstanceOf(const Parent&); \ 595 static const Derived& downcast(const Parent&); \ 596 static Derived& updDowncast(Parent&) 602 namespace Exception { }
618 template <
int M,
class ELT=Real,
int STRIDE=1>
class Vec;
619 template <
int N,
class ELT=Real,
int STRIDE=1>
class Row;
620 template <
int M,
int N,
class ELT=Real,
int CS=M,
int RS=1>
class Mat;
621 template <
int M,
class ELT=Real,
int RS=1>
class SymMat;
628 assert(l>=0 && ofs>=0);
640 template<
class L,
class R>
inline 643 return !(left == right);
646 template<
class L,
class R>
inline 652 template<
class L,
class R>
inline 655 return !(right < left);
658 template<
class L,
class R>
inline 661 return !(left < right);
715 #define SimTK_SPECIALIZE_INTEGRAL_TYPE(T) \ 716 template<> struct IsIntegralType<T> \ 717 {typedef TrueType Result; static const bool result = true;} 746 #define SimTK_SPECIALIZE_FLOATING_TYPE(T) \ 747 template<> struct IsFloatingType<T> \ 748 {typedef TrueType Result; static const bool result = true;} 801 std::string demangle(
const char* name);
811 std::string canonicalizeTypeName(std::string&& demangledTypeName);
816 {
return canonicalizeTypeName(std::string(demangledTypeName)); }
824 std::string encodeTypeNameForXML(std::string&& canonicalizedTypeName);
829 {
return encodeTypeNameForXML(std::string(niceTypeName)); }
836 std::string decodeXMLTypeName(std::string&& xmlTypeName);
841 {
return decodeXMLTypeName(std::string(xmlTypeName)); }
862 static const char*
name() {
return typeid(T).
name();}
868 static const std::string canonical =
888 #define SimTK_NICETYPENAME_LITERAL(T) \ 890 template <> struct NiceTypeName< T > { \ 891 static const char* name() { return #T; } \ 892 static const std::string& namestr() { \ 893 static const std::string str(#T); \ 896 static const std::string& xmlstr() { \ 897 static const std::string xml = encodeTypeNameForXML(namestr()); \ bool operator<=(const L &left, const R &right)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:653
This is an operator for exclusive or-ing compile-time truth types.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:698
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:224
OrOpType< typename IsIntegralType< T >::Result, typename IsFloatingType< T >::Result > Result
This typedef is TrueType if the template type T is one of the integral; or floating point types...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:771
std::string canonicalizeTypeName(std::string &&demangledTypeName)
Given a compiler-dependent demangled type name string as returned by SimTK::demangle(), attempt to form a canonicalized representation that will be the same for any compiler.
This is a small, fixed-size symmetric or Hermitian matrix designed for no-overhead inline computation...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:621
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:688
This is a special type used for causing invocation of a particular constructor or method overload tha...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:670
bool canStoreInNonnegativeInt(bool)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:320
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
bool canStoreInInt(bool)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:305
std::complex< Real > Complex
This is the default complex type for SimTK, with precision for the real and imaginary parts set to th...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:609
Segment()
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:626
static const std::string & namestr()
The default implementation of namestr() attempts to return a nicely demangled and canonicalized type ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:867
static const int InvalidIndex
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:390
double SimTK_Real
This type is for use in C; in C++ use SimTK::Real instead.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:113
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:685
Compile-time type test: is this the void type?.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:754
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:694
This is a compile-time equivalent of "false", used in compile-time condition checking in templatized ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:678
Is64BitHelper< Is64BitPlatform >::Result Is64BitPlatformType
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:793
std::string encodeTypeNameForXML(const std::string &niceTypeName)
Same, but takes an lvalue reference so has to copy the input.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:828
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:692
bool isIndexInRange(char ix, char sz)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:357
Segment(int l, int ofs=0)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:627
static const char * name()
The default implementation of name() here returns the raw result from `typeid(T). ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:862
std::string canonicalizeTypeName(const std::string &demangledTypeName)
Same, but takes an lvalue reference so has to copy the input.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:815
This is a fixed-length column vector designed for no-overhead inline computation. ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:618
FalseType Result
This typedef is TrueType if the template type T is "void"; otherwise it is FalseType.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:757
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:695
This is an operator for or-ing compile-time truth types.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:691
static const bool result
This compile-time constant bool is true if the template type T is "void" otherwise it is false...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:760
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:702
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:700
Compile-time test: is this one of the built-in "arithmetic" types, meaning an integral or floating ty...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:767
constexpr bool detect64BitPlatform()
Compile-time test: this typedef will be TrueType if this is a 64-bit platform, meaning that the size ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:791
static const bool result
This compile-time constant bool is true if the template type T is a floating point type otherwise it ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:742
void SimTK_about_SimTKcommon(const char *key, int maxlen, char *value)
Obtain "about" information for the currently-loaded SimTKcommon library.
static const std::string & xmlstr()
The default implementation of xmlstr() takes the output of namestr() and invokes SimTK::encodeTypeNam...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:874
void SimTK_version_SimTKcommon(int *major, int *minor, int *build)
Obtain version information for the currently-loaded SimTKcommon library.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:780
This is a compile-time equivalent of "true", used in compile-time condition checking in templatized i...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:681
SimTK_SPECIALIZE_INTEGRAL_TYPE(bool)
This is a special type used for forcing invocation of a particularly dangerous constructor or method ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:674
Compile-time type test: is this one of the built-in integral types?.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:705
std::complex< double > dComplex
An abbreviation for std::complex<double> for consistency with others.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:613
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:699
Compile-time type test: is this one of the built-in floating point types?.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:736
FalseType Result
This typedef is TrueType if the template type T is an integral type; otherwise it is FalseType...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:708
FalseType Result
This typedef is TrueType if the template type T is a floating point type; otherwise it is FalseType...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:739
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:686
std::string encodeTypeNameForXML(std::string &&canonicalizedTypeName)
Given a canonicalized type name, produce a modified version that is better-suited to use as an XML at...
static const bool result
This compile-time constant bool is true if the template type T is one of the integral or floating poi...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:774
This is a fixed-length row vector designed for no-overhead inline computation.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:619
std::string demangle(const char *name)
Attempt to demangle a type name as returned by typeid.name(), with the result hopefully suitable for ...
std::complex< float > fComplex
An abbreviation for std::complex<float> for consistency with others.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:611
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:701
Obtain human-readable and XML-usable names for arbitrarily-complicated C++ types. ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:858
A convenient struct for anything requiring an offset and length to specify a segment of some larger s...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:625
static const bool Is64BitPlatform
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:792
int length
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:631
bool operator!=(const L &left, const R &right)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:641
This class represents a small matrix whose size is known at compile time, containing elements of any ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:620
bool operator>(const L &left, const R &right)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:647
SimTK_SPECIALIZE_FLOATING_TYPE(float)
bool operator>=(const L &left, const R &right)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:659
This is an operator for and-ing compile-time truth types.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:684
int offset
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:632
#define SimTK_NICETYPENAME_LITERAL(T)
This specializes the name of a type to be exactly the text you use to specify it, rather than whateve...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:888
bool isSizeInRange(char sz, char mx)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:338
std::string decodeXMLTypeName(const std::string &xmlTypeName)
Same, but takes an lvalue reference so has to copy the input.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:840
static const bool result
This compile-time constant bool is true if the template type T is an integral type otherwise it is fa...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:711
bool isNonnegative(bool)
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:373
TrueType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:693
FalseType Result
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:687