Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:22

0001 #ifndef Geometry_CommonTopologies_SurfaceDeformationFactory_H
0002 #define Geometry_CommonTopologies_SurfaceDeformationFactory_H
0003 
0004 /// SurfaceDeformationFactory
0005 ///
0006 /// Factory for concrete implementations of SurfaceDeformation
0007 ///
0008 ///  \author    : Gero Flucke
0009 ///  date       : October 2010
0010 
0011 #include <vector>
0012 #include <string>
0013 
0014 class SurfaceDeformation;
0015 
0016 namespace SurfaceDeformationFactory {
0017   enum Type {
0018     // rigid body has no deformations! kRigidBody = 0,
0019     kBowedSurface = 1,  // BowedSurfaceDeformation
0020     kTwoBowedSurfaces,  // TwoBowedSurfacesDeformation
0021     kNoDeformations     // To please compilers
0022   };
0023 
0024   /// convert string to 'Type' - exception if string is not known
0025   Type surfaceDeformationType(const std::string &typeString);
0026   std::string surfaceDeformationTypeName(const Type &type);
0027 
0028   /// Create an instance of the concrete implementations of
0029   /// the 'SurfaceDeformation' interface
0030   /// First argument 'type' must match one of the enums defined above
0031   /// and the size of 'params' must match the expectation of the
0032   /// concrete type (exception otherwise).
0033   SurfaceDeformation *create(int type, const std::vector<double> &params);
0034   SurfaceDeformation *create(const std::vector<double> &params);
0035 
0036 }  // namespace SurfaceDeformationFactory
0037 
0038 #endif