13 |
|
|
14 |
|
// initialize to an error: |
15 |
|
atp.ident = -1; |
16 |
< |
// make the type empty: |
17 |
< |
name = NULL; |
16 |
> |
|
17 |
|
// and massless: |
18 |
|
mass = 0.0; |
19 |
|
|
29 |
|
atp.is_FLARB = 0; |
30 |
|
} |
31 |
|
|
33 |
– |
AtomType::~AtomType() { |
34 |
– |
if ( name != NULL ) delete name; |
35 |
– |
} |
36 |
– |
|
32 |
|
void AtomType::complete() { |
33 |
|
|
34 |
|
int status; |
35 |
|
|
36 |
< |
if (name == NULL) { |
36 |
> |
if (name.empty()) { |
37 |
|
sprintf( painCave.errMsg, |
38 |
|
"Attempting to complete an AtomType without giving " |
39 |
|
"it a name!\n"); |
45 |
|
if (atp.ident == -1) { |
46 |
|
sprintf( painCave.errMsg, |
47 |
|
"Attempting to complete AtomType %s without setting the" |
48 |
< |
" ident!/n", name); |
48 |
> |
" ident!/n", name.c_str()); |
49 |
|
painCave.severity = OOPSE_ERROR; |
50 |
|
painCave.isFatal = 1; |
51 |
|
simError(); |
53 |
|
|
54 |
|
status = 0; |
55 |
|
|
56 |
< |
makeAtype(atp, &status); |
56 |
> |
makeAtype(&atp, &status); |
57 |
|
|
58 |
|
if (status != 0) { |
59 |
|
sprintf( painCave.errMsg, |
60 |
< |
"Fortran rejected AtomType %s!\n", name); |
60 |
> |
"Fortran rejected AtomType %s!\n", name.c_str()); |
61 |
|
painCave.severity = OOPSE_ERROR; |
62 |
|
painCave.isFatal = 1; |
63 |
|
simError(); |