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  {
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

Generated for HippoDraw Class Library by doxygen