20 #include "msdevstudio/MSconfig.h"
115 string::size_type pos = name.find_first_of (
" -" );
117 if ( pos == string::npos ) {
119 assert ( transform != 0 );
120 return transform->
clone ();
124 string name1 = name.substr ( 0, pos );
125 string name2 = name.substr ( pos+1 );
127 string::size_type pos2 = name2.find_first_of (
" -" );
129 if ( pos2 == string::npos ) {
132 return createXY ( name1, name2,
"Linear" );
135 string name21 = name2.substr ( 0, pos2 );
136 string name22 = name2.substr ( pos2+1 );
138 return createXY ( name1, name21, name22 );
142 const std::string & y,
143 const std::string & z )
153 if ( x_unary == 0 || y_unary == 0 || z_unary == 0 ) {
154 cout <<
"Could not create XYTransform" << x <<
" "
155 << y <<
" " << z << endl;
176 const std::string & y,
177 const std::string & z )
187 if ( xut == 0 || yut == 0 || zut == 0 ) {
188 cout <<
"Could not create XYZTransform"
189 << x <<
" " << y <<
" " << z << endl;
hippodraw::HammerAito class interface
virtual TransformBase * clone() const =0
Creates a new Transform object by copying an existing one.
A transform on one axis whose output is equal to the input.
A transform that performs the AIR2 projection.
A transform that transforms coordinates from one coordinate system to another.
LinearTransform class interface.
GlobalSinusoidal class interface.
TransformBase * prototype(const std::string &name) const
Returns a pointer to a prototype with name name.
A UnaryTransform which takes the log of the coordinate.
hippodraw::XYTransform class interface
virtual UnaryTransform * clone() const =0
Function to make copy of object.
A transform that transforms the X and Y coordinates independently.
hippodraw::Mercator class interface
A transform that performs the TAN2 projection.
A transform that performs the SIN projection.
A transform that performs the Cartesian2 projection.
void add(TransformBase *)
Adds a prototype object to the list of prototypes.
A transform that performs the Lambert2 projection.
TransformBase * createTransform(const std::string &name)
Creates a returns a new TransformBase object with given name.
A transform that performs the STG2 projection.
void initialize()
Initialize the factory with a set of default Transforms.
static TransformFactory * instance()
Returns a pointer to the singleton instance.
Cartesian class interface.
hippodraw::HammerAito2 class interface
A transform that performs the TAN projection.
A transform that performs the ARC2 projection.
A transform that performs the HammerAito projection.
hippodraw::Mercator2 class interface
TransformBase * createXY(const std::string &x_trans, const std::string &y_trans, const std::string &z_trans)
Creates an XYTransform object from independent X, Y and Z transforms designated by the names...
A transform that performs the Cartesian projection.
GlobalSinusoidal2 class interface.
static TransformFactory * s_instance
A pointer to the singleton object.
Lambert2 class interface.
A transform that performs the GlobalSinusoidal2 projection.
LogTransform class interface.
A transform that transforms the X, Y and Z coordinates independently.
A transform that performs the AIR projection.
A transform that performs the Lambert projection.
A transform that transforms coordinates in one dimension from one coordinate system to another...
A transform that performs the Mercator2 projection.
A transform that performs the STG projection.
A transform that performs the GlobalSinusoidal projection.
Cartesian2 class interface.
A transform that performs the ARC projection.
A transform that performs the HammerAito projection.
The singleton Factory class for creating objects whose class is derived from TransformBase.
TransformBase * createXYZ(const std::string &x_trans, const std::string &y_trans, const std::string &z_trans)
Creates an XYZTransform object from independent X, Y and Z transforms designated by the name...
A transform that performs the SIN2 projection.
TransformFactory()
A default constructor for prevent creation except by itself.
A transform that performs the Mercator projection.