cisst-saw
Loading...
Searching...
No Matches
vctContainerTraits.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5
6 Author(s): Anton Deguet
7 Created on: 2004-11-11
8
9 (C) Copyright 2004-2007 Johns Hopkins University (JHU), All Rights
10 Reserved.
11
12--- begin cisst license - do not edit ---
13
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://www.cisst.org/cisst/license.txt.
17
18--- end cisst license ---
19*/
20
21#pragma once
22#ifndef _vctContainerTraits_h
23#define _vctContainerTraits_h
24
30
31#include <cstddef>
32
33namespace vct
34{
35 typedef size_t size_type;
36 typedef size_t index_type;
37 typedef ptrdiff_t stride_type;
38 typedef ptrdiff_t difference_type;
39}
40
41
50#define VCT_CONTAINER_TRAITS_TYPEDEFS(type) \
51 typedef vct::size_type size_type; \
52 typedef vct::index_type index_type; \
53 typedef vct::difference_type difference_type; \
54 typedef vct::stride_type stride_type; \
55 typedef type value_type; \
56 typedef value_type & reference; \
57 typedef const value_type & const_reference; \
58 typedef value_type * pointer; \
59 typedef const value_type * const_pointer; \
60 typedef double NormType; \
61 typedef double AngleType
62
63
68#define VCT_NARRAY_TRAITS_TYPEDEFS(dimension) \
69 typedef vctFixedSizeVector<size_type, dimension> nsize_type; \
70 typedef vctFixedSizeVector<stride_type, dimension> nstride_type; \
71 typedef vctFixedSizeVector<index_type, dimension> nindex_type; \
72 typedef size_type dimension_type; \
73 typedef vctFixedSizeVector<dimension_type, dimension> ndimension_type
74
75
76#endif // _vctContainerTraits_h
77
Definition vctContainerTraits.h:34
ptrdiff_t difference_type
Definition vctContainerTraits.h:38
size_t size_type
Definition vctContainerTraits.h:35
size_t index_type
Definition vctContainerTraits.h:36
ptrdiff_t stride_type
Definition vctContainerTraits.h:37