00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
#ifndef GCU_ELEMENT_H
00028
#define GCU_ELEMENT_H
00029
00030
#include <glib.h>
00031
#include <string>
00032
#include <vector>
00033
#include "chemistry.h"
00034
00035
using namespace std;
00036
00037
class EltTable;
00038
00042
namespace gcu
00043 {
00044
00051 class Element
00052 {
00053
friend class EltTable;
00054
private:
00061
Element(
int Z,
const char*
Symbol);
00062
virtual ~
Element();
00063
00064
public:
00069
static const gchar*
Symbol(gint Z);
00077
static bool BestSide(gint Z);
00082
static gint
Z(
const gchar* symbol);
00087
static Element*
GetElement(gint Z);
00092
static Element*
GetElement(
const gchar* symbol);
00109
static bool GetRadius(
GcuAtomicRadius* radius);
00122
static bool GetElectronegativity(
GcuElectronegativity* en);
00130
static unsigned GetMaxBonds(gint Z);
00131
00135 int GetZ() {
return m_Z;}
00139 const char*
GetSymbol() {
return m_Symbol;}
00144 char GetDefaultValence() {
return m_DefaultValence;}
00150 unsigned GetMaxBonds() {
return m_MaxBonds;}
00156 bool GetBestSide() {
return m_BestSide;}
00161 double*
GetDefaultColor() {
return m_DefaultColor;}
00165 const char*
GetName() {
return name.c_str();}
00170
const GcuAtomicRadius**
GetRadii();
00175
const GcuElectronegativity**
GetElectronegativities();
00176
00177
private:
00178
unsigned char m_Z;
00179
char m_Symbol[4];
00180
char m_DefaultValence;
00181
unsigned char m_MaxBonds;
00182
bool m_BestSide;
00183
double m_DefaultColor[3];
00184 string name;
00185 vector<GcuAtomicRadius*> m_radii;
00186 vector<GcuElectronegativity*> m_en;
00187 };
00188
00189 }
00190
00191
#endif // GCU_ELEMENT_H