68 |
|
|
69 |
|
ElementsTable::~ElementsTable() { |
70 |
|
std::vector<Element*>::iterator i; |
71 |
< |
for (i = elements_.begin(); i != elements_.end(); i++) |
71 |
> |
for (i = elements_.begin(); i != elements_.end(); ++i) |
72 |
|
delete *i; |
73 |
|
} |
74 |
|
|
75 |
|
void ElementsTable::ParseLine(const char *line) { |
76 |
|
int num, maxbonds; |
77 |
< |
char symbol[5]; |
77 |
> |
char symbol[6]; |
78 |
|
char name[256]; |
79 |
|
RealType Rcov,Rvdw,mass, elNeg, ionize, elAffin; |
80 |
|
RealType red, green, blue; |
269 |
|
Init(); |
270 |
|
|
271 |
|
std::vector<Element*>::iterator i; |
272 |
< |
for (i = elements_.begin();i != elements_.end();i++) |
272 |
> |
for (i = elements_.begin();i != elements_.end(); ++i) |
273 |
|
if (!strncasecmp(sym,(*i)->GetSymbol(),2)) |
274 |
|
return((*i)->GetAtomicNum()); |
275 |
|
|
326 |
|
simError(); |
327 |
|
} |
328 |
|
|
329 |
< |
char charBuffer[BUFF_SIZE]; |
329 |
> |
|
330 |
|
if ((*ifsP)) { |
331 |
+ |
char charBuffer[BUFF_SIZE]; |
332 |
|
while(ifsP->getline(charBuffer,BUFF_SIZE)) |
333 |
|
ParseLine(charBuffer); |
334 |
< |
|
334 |
> |
|
335 |
|
if (ifs1) |
336 |
|
ifs1.close(); |
337 |
|
if (ifs2) |