source: molecuilder/src/element.cpp@ a89a22

Last change on this file since a89a22 was 75793b2, checked in by Frederik Heber <heber@…>, 17 years ago

these are all smaller fixes due to extensively enabled compiler warnings

e.g. local variable shadows global (mol::nr by local nr)
and others

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/** \file element.cpp
2 *
3 * Function implementations for the class element.
4 *
5 */
6
7#include "molecules.hpp"
8
9/************************************* Functions for class element **********************************/
10
11/** Constructor of class element.
12 */
13element::element() {
14 Z = -1;
15 No = -1;
16 previous = NULL;
17 next = NULL;
18 sort = NULL;
19};
20
21/** Destructor of class element.
22 */
23element::~element() {};
24
25/** Prints element data to \a *out.
26 * \param *out outstream
27 */
28bool element::Output(ofstream *out) const
29{
30 if (out != NULL) {
31 *out << name << "\t" << symbol << "\t" << period << "\t" << group << "\t" << block << "\t" << Z << "\t" << mass << "\t" << CovalentRadius << "\t" << VanDerWaalsRadius << endl;
32 //*out << Z << "\t" << fixed << setprecision(11) << showpoint << mass << "g/mol\t" << name << "\t" << symbol << "\t" << endl;
33 return true;
34 } else
35 return false;
36};
37
38/** Prints element data to \a *out.
39 * \param *out outstream
40 * \param No cardinal number of element
41 * \param NoOfAtoms total number of atom of this element type
42 */
43bool element::Checkout(ofstream *out, const int Number, const int NoOfAtoms) const
44{
45 if (out != NULL) {
46 *out << "Ion_Type" << Number << "\t" << NoOfAtoms << "\t" << Z << "\t1.0\t3\t3\t" << fixed << setprecision(11) << showpoint << mass << "\t" << name << "\t" << symbol <<endl;
47 return true;
48 } else
49 return false;
50};
Note: See TracBrowser for help on using the repository browser.