ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/UseTheForce/ForceFieldFactory.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/UseTheForce/ForceFieldFactory.hpp (file contents):
Revision 1836 by tim, Thu Dec 2 03:12:25 2004 UTC vs.
Revision 1837 by tim, Thu Dec 2 22:15:31 2004 UTC

# Line 40 | Line 40 | class ForceField;
40  
41   //forward declaration
42   class ForceField;
43 <
43 > class ForceFieldCreator;
44   /**
45   * @class ForceFieldFactory ForceFieldFactory.hpp "UseTheForce/ForceFieldFactory.hpp"
46   * Factory pattern and Singleton Pattern are used to define an interface for creating an ForceField.
47   */
48   class ForceFieldFactory {
49      public:
50 <
51 <        /** a function pointer which has not parameter and return a pointer pointer to a ForceField instance*/
52 <        typedef ForceField* (*ForceFieldCreatorType)();        
53 <        
54 <        typedef std::map<std::string, ForceFieldCreatorType> CreatorMapType;
50 >                
51 >        typedef std::map<std::string, ForceFieldCreator*> CreatorMapType;
52          typedef std::vector<std::string> IdentVectorType;
53          typedef std::vector<std::string>::iterator IdentVectorIterator;
54                      
# Line 74 | Line 71 | class ForceFieldFactory {
71           * @id the identification of the concrete object
72           * @creator the object responsible to create the concrete object
73           */
74 <        bool registerForceField(const std::string& id, ForceFieldCreatorType creator);
74 >        bool registerForceField(ForceFieldCreator* creator);
75  
76          /**
77           * Unregisters the creator for the given type identifier. If the type identifier

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines