ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/types/AtomType.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/types/AtomType.cpp (file contents):
Revision 1739, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1740 by tim, Mon Nov 15 23:00:32 2004 UTC

# Line 8 | Line 8 | namespace oopse {
8   #define __C
9   #include "UseTheForce/DarkSide/atype_interface.h"
10  
11 < namespace oopse {
11 > name_space oopse {
12    AtomType::AtomType(){
13      
14      // initialize to an error:
15 <    atp.ident = -1;
15 >    atp_.ident = -1;
16  
17 <    // and massless:
18 <    mass = 0.0;
17 >    // and mass_less:
18 >    mass_ = 0.0;
19      
20      // atom type is a Tabula Rasa:
21 <    atp.is_Directional = 0;
22 <    atp.is_LennardJones = 0;
23 <    atp.is_Electrostatic = 0;
24 <    atp.is_Charge = 0;
25 <    atp.is_Dipole = 0;
26 <    atp.is_Sticky = 0;
27 <    atp.is_GayBerne = 0;
28 <    atp.is_EAM = 0;
29 <    atp.is_Shape = 0;
30 <    atp.is_FLARB = 0;  
21 >    atp_.is_Directional = 0;
22 >    atp_.is_LennardJones = 0;
23 >    atp_.is_Electrostatic = 0;
24 >    atp_.is_Charge = 0;
25 >    atp_.is_Dipole = 0;
26 >    atp_.is_Sticky = 0;
27 >    atp_.is_GayBerne = 0;
28 >    atp_.is_EAM = 0;
29 >    atp_.is_Shape = 0;
30 >    atp_.is_FLARB = 0;  
31    }
32      
33    void AtomType::complete() {
34      
35      int status;
36  
37 <    if (name.empty()) {
37 >    if (name_.empty()) {
38        sprintf( painCave.errMsg,
39                 "Attempting to complete an AtomType without giving "
40 <               "it a name!\n");
40 >               "it a name_!\n");
41        painCave.severity = OOPSE_ERROR;
42        painCave.isFatal = 1;
43        simError();
44      }
45      
46 <    if (atp.ident == -1) {
46 >    if (atp_.ident == -1) {
47        sprintf( painCave.errMsg,
48                 "Attempting to complete AtomType %s without setting the"
49 <               " ident!/n", name.c_str());
49 >               " ident!/n", name_.c_str());
50        painCave.severity = OOPSE_ERROR;
51        painCave.isFatal = 1;
52        simError();          
# Line 54 | Line 54 | namespace oopse {
54  
55      status = 0;
56  
57 <    makeAtype(&atp, &status);  
57 >    makeAtype(&atp_, &status);  
58      
59      if (status != 0) {
60        sprintf( painCave.errMsg,
61 <               "Fortran rejected AtomType %s!\n", name.c_str());
61 >               "Fortran rejected AtomType %s!\n", name_.c_str());
62        painCave.severity = OOPSE_ERROR;
63        painCave.isFatal = 1;
64        simError();          
65      }
66    }
67 +
68 + void AtomType::addProperty(GenericData* genData) {
69 +    properties_.addProperty(genData);  
70   }
71 +
72 + void AtomType::removeProperty(const std::string& propName) {
73 +    properties_.removeProperty(propName);  
74 + }
75 +
76 + void AtomType::clearProperties() {
77 +    properties_.clearProperties();
78 + }
79 +
80 + std::vector<std::string> AtomType::getPropertyNames() {
81 +    return properties_.getPropertyNames();  
82 + }
83 +      
84 + std::vector<GenericData*> AtomType::getProperties() {
85 +    return properties_.getProperties();
86 + }
87 +
88 + GenericData* AtomType::getPropertyByName(const std::string& propName) {
89 +    return properties_.getPropertyByName(propName);
90 + }  
91 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines