/* * $Header$ * $Log$ */ #include #include #include #include #include "XSElements.h" //ClassImp(XSElement) /* =================== XSElement ===================== */ XSElement::XSElement() { z = 0; name = NULL; symbol = NULL; isotope = NULL; atomic_weight = NULL; density = NULL; melting_point = NULL; boiling_point = NULL; oxidation_states = NULL; isotope = NULL; } // XSElement /* ---------- ~XSElement ----------- */ XSElement::~XSElement() { if (name) free(name); if (symbol) free(symbol); if (atomic_weight) free(atomic_weight); if (density) free(density); if (melting_point) free(melting_point); if (boiling_point) free(boiling_point); if (oxidation_states) free(oxidation_states); for (int i=0; iAdd(new XSElement()); ((XSElement*)(*elements)[i])->Read(f); } fclose(f); } // XSElements /* --------- ~XSElements ---------- */ XSElements::~XSElements() { delete elements; } // ~XSElements /* --------- Find ----------- */ UInt_t XSElements::Find(const char *str) { for (UInt_t z=1; z<=NElements; z++) { if (!strcmp(str,Name(z))) return z; if (!strcmp(str,Mnemonic(z))) return z; } return 0; } // Find