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

Comparing branches/new_design/OOPSE-4/src/UseTheForce/ForceFieldFactory.hpp (file contents):
Revision 1740 by tim, Mon Nov 15 23:00:32 2004 UTC vs.
Revision 1824 by tim, Thu Dec 2 03:12:25 2004 UTC

# Line 35 | Line 35
35   #include <map>
36   #include <string>
37   #include <vector>
38 <
38 > #include <iostream>
39   namespace oopse {
40  
41   //forward declaration
# Line 59 | Line 59 | class ForceFieldFactory {
59           * Returns an instance of ForceField factory
60           * @return an instance of ForceField factory
61           */        
62 <        static ForceFieldFactory* getInstance();
62 >        static ForceFieldFactory* getInstance() {
63  
64 +            if (instance_ == NULL) {
65 +                instance_ = new ForceFieldFactory();
66 +            }
67 +            return instance_;
68 +            
69 +        }
70 +
71          /**
72           * Registers a creator with a type identifier
73           * @return true if registration is succeed, otherwise return false

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines