Simbody  3.4 (development)
SimTK::ArrayIndexTraits< unsigned short > Struct Template Reference

Specialization of ArrayIndexTraits for unsigned short used as an index. More...

#include <Array.h>

List of all members.

Public Types

typedef unsigned short size_type
typedef int difference_type

Static Public Member Functions

static size_type max_size ()

Detailed Description

template<>
struct SimTK::ArrayIndexTraits< unsigned short >

Specialization of ArrayIndexTraits for unsigned short used as an index.

We don't have any bits to spare here so we want to allow the full 65535 elements for an unsigned short indexed container. That means the index difference range is -65534..+65534 which doesn't fit in a short so we have to use an int for difference_type to accommodate the whole range.


Member Typedef Documentation

typedef unsigned short SimTK::ArrayIndexTraits< unsigned short >::size_type
typedef int SimTK::ArrayIndexTraits< unsigned short >::difference_type

Member Function Documentation

static size_type SimTK::ArrayIndexTraits< unsigned short >::max_size ( ) [inline, static]

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines