BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Material.h File Reference

Defines and implements class Material. More...

Include dependency graph for Material.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Material
 A wrapper for underlying material implementation. More...
 

Functions

bool operator!= (const Material &left, const Material &right)
 Comparison operator for material wrapper (inequality check) More...
 
bool operator== (const Material &left, const Material &right)
 Comparison operator for material wrapper (equality check) More...
 

Detailed Description

Defines and implements class Material.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file Material.h.

Function Documentation

◆ operator!=()

bool operator!= ( const Material left,
const Material right 
)

Comparison operator for material wrapper (inequality check)

Definition at line 126 of file Material.cpp.

127 {
128  return !(left == right);
129 }

◆ operator==()

bool operator== ( const Material left,
const Material right 
)

Comparison operator for material wrapper (equality check)

Definition at line 113 of file Material.cpp.

114 {
115  if (left.getName() != right.getName())
116  return false;
117  if (left.magnetization() != right.magnetization())
118  return false;
119  if (left.materialData() != right.materialData())
120  return false;
121  if (left.typeID() != right.typeID())
122  return false;
123  return true;
124 }
kvector_t magnetization() const
Get the magnetization (in A/m)
Definition: Material.cpp:76
std::string getName() const
Returns the name of material.
Definition: Material.cpp:66
MATERIAL_TYPES typeID() const
Returns the type of underlying material implementation.
Definition: Material.cpp:71
complex_t materialData() const
Returns underlying material data.
Definition: Material.cpp:81

References Material::getName(), Material::magnetization(), Material::materialData(), and Material::typeID().

Here is the call graph for this function: