Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
axes
AxesType.cxx
Go to the documentation of this file.
1
/* -*- mode:c++ -*- */
2
17
#include "
AxesType.h
"
18
19
#include <cassert>
20
21
namespace
hippodraw {
22
23
namespace
Axes {
24
30
static
Type
types
[] = {
X
,
Y
,
Z
,
W
,
XE
,
YE
,
UNKNOWN
};
31
32
Type
convert
(
const
std::string & axis )
33
{
34
hippodraw::Axes::Type
type
=
UNKNOWN
;
35
if
( axis ==
"x"
|| axis ==
"X"
) type =
X
;
36
else
if
( axis ==
"y"
|| axis ==
"Y"
) type =
Y
;
37
else
if
( axis ==
"z"
|| axis ==
"Z"
) type =
Z
;
38
else
if
( axis ==
"t"
|| axis ==
"T"
) type =
T
;
39
40
return
type
;
41
}
42
43
Type
convert
(
unsigned
int
i
)
44
{
45
assert ( i <=
UNKNOWN
);
46
47
return
types
[
i
];
48
}
49
50
}
// end namespace Axes
51
}
// end namespace hippodraw
i
unsigned int i
Definition:
CanvasView.cxx:3091
hippodraw::Axes::XE
X error or width.
Definition:
AxesType.h:37
hippodraw::Axes::Z
Z axis.
Definition:
AxesType.h:35
hippodraw::Axes::W
weight
Definition:
AxesType.h:36
hippodraw::Axes::YE
Y error or width.
Definition:
AxesType.h:38
num_util::type
PyArray_TYPES type(numeric::array arr)
Definition:
num_util.cpp:249
hippodraw::Axes::X
X axis.
Definition:
AxesType.h:33
hippodraw::Axes::types
static Type types[]
An array to allow conversion of integer to enumeration.
Definition:
AxesType.cxx:30
hippodraw::Axes::UNKNOWN
Definition:
AxesType.h:40
hippodraw::Axes::Y
Y axis.
Definition:
AxesType.h:34
AxesType.h
The namespace for axes.
hippodraw::Axes::T
title
Definition:
AxesType.h:39
hippodraw::Axes::convert
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
Definition:
AxesType.cxx:32
hippodraw::Axes::Type
Type
Axes constants.
Definition:
AxesType.h:31
Generated for HippoDraw Class Library by