element.h

来自「Flowlive The thermo library provides th」· C头文件 代码 · 共 63 行

H
63
字号
//---------------------------------------------------------------------------
//  Project:         FlowLive
//  Module:          thermo
/*!\file             element.h
	\brief            Class for a chemical element
	\version          0.0.2.0
	\date             Created: 2005-01-18
	\date             Last modified: 2005-01-18
	\author           <a href="mailto:xtobias@gmx.net">Tobias Severin, xtobias@gmx.net</a>
*/
//---------------------------------------------------------------------------
#ifndef ELEMENT_H
#define ELEMENT_H
//---------------------------------------------------------------------------
#include <thermo/thermo.h>

#include <string>

//---------------------------------------------------------------------------
THERMO_BEGIN

THERMO_EXPORT
class cElement
{
	protected:
		//! The literal name of the element (e. g. 'Hydrogen')
		std::string itsName;

		//! The chemical symbol of the element (e. g. 'H')
		std::string itsSymbol;

		//! The atomic weight of the element [amu]
		double itsAtomicWeight;

		//! The number of the element (in the periodic system)
		int itsNumber;

	public:
		//! The constructor
		cElement(std::string aName, std::string itsSymbol, double aAtomicWeight, int aNumber);

		//! The destructor
		~cElement();

		//! Returns the name of the element
		std::string Name();

		//! Returns the symbol of the element
		std::string Symbol();

		//! Returns the atomic weight of the element [amu]
		double AtomicWeight();

		//! Returns the number of the element
		int Number();

};
//---------------------------------------------------------------------------
THERMO_END

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?