CEPS  24.01
Cardiac ElectroPhysiology Simulator
ElectrodeBase Class Reference

Detailed Description

Base class for electrode objects. This one just holds attributes and size, and has very few options.

Definition at line 41 of file ElectrodeBase.hpp.

#include <ElectrodeBase.hpp>

Inheritance diagram for ElectrodeBase:
[legend]

Public Member Functions

 ElectrodeBase (CepsString name, const CepsSet< CepsAttribute > &attrs, Geometry *geom=nullptr)
 Constructor with attributes. Geometry can be passed to set size directly. More...
 
 ElectrodeBase (CepsString name, InputParameters *params, Geometry *geom=nullptr)
 Constructor with parameters from input file. Gets attributes from key "<m_identifier> attributes". More...
 
 ~ElectrodeBase ()=default
 Destructor. More...
 
CepsString getName () const
 Get electrode label. More...
 
CepsReal getMeasure () const
 Get the electrode measure in cm or cm^2. More...
 
void computeMeasure (Geometry *geom)
 Set the electrode measure in cm or cm^2. More...
 
void setupWithParameters (InputParameters *params)
 Sets options from the parameters. More...
 
- Public Member Functions inherited from ceps::HoldsAttributes
 HoldsAttributes (const CepsSet< CepsAttribute > &attributes)
 Constructor with any number of attributes. More...
 
 HoldsAttributes (const CepsVector< CepsAttribute > &attributes)
 Constructor with any number of attributes. More...
 
 HoldsAttributes (CepsAttribute *attributes, const CepsUInt &n)
 Constructor with any number of attributes. More...
 
 HoldsAttributes ()=default
 Default constructor. More...
 
 HoldsAttributes (const HoldsAttributes &)=default
 Assignement operator. More...
 
 HoldsAttributes (HoldsAttributes &&) noexcept=default
 Copy constructor. More...
 
virtual ~HoldsAttributes ()=default
 Destructor. More...
 
HoldsAttributesoperator= (const HoldsAttributes &)=default
 Assignment operator. More...
 
HoldsAttributesoperator= (HoldsAttributes &&) noexcept=default
 Assignment operator. More...
 
CepsUInt getNumberOfAttributes () const
 Returns number of attributes of the entity. More...
 
CepsSet< CepsAttribute > & getAttributes ()
 Returns the attributes of the entity. More...
 
const CepsSet< CepsAttribute > & getAttributes () const
 Returns the attributes of the entity, const version. More...
 
void setAttributes (const CepsVector< CepsAttribute > &attributes)
 Sets the attributes of the entity. More...
 
void setAttributes (const CepsSet< CepsAttribute > &attributes)
 Sets the attributes of the entity. More...
 
void setAttributes (const CepsAttribute *attributes, const CepsUInt &n)
 Sets the attributes of the entity. More...
 
template<class _It >
void setAttributes (_It first, _It last)
 Sets the attributes of the entity. More...
 
void addAttribute (const CepsAttribute &name)
 Adds an attribute to the entity. More...
 
void addAttributes (const CepsVector< CepsAttribute > &attributes)
 Adds several attributes to the entity. More...
 
void addAttributes (const CepsSet< CepsAttribute > &attributes)
 Adds several attributes to the entity. More...
 
void addAttributes (const CepsAttribute *attributes, const CepsUInt &n)
 Adds several attributes to the entity. More...
 
template<class _It >
void addAttributes (_It first, _It last)
 Adds several attributes to the entity. More...
 
void removeAttribute (const CepsAttribute &name)
 Removes an attribute from the entity. More...
 
void removeAttributes (const CepsSet< CepsAttribute > &attributes)
 Removes several attributes from the entity. More...
 
void removeAttributes (const CepsVector< CepsAttribute > &attributes)
 Removes several attributes from the entity. More...
 
void removeAttributes (const CepsAttribute *attributes, const CepsUInt &n)
 Removes several attributes from the entity. More...
 
template<class _It >
void removeAttributes (_It first, _It last)
 Removes several attributes from the entity. More...
 
void clearAttributes ()
 Removes all attributes from the entity. More...
 
CepsBool hasAttribute (const CepsAttribute &name) const
 Tells if the entity has the attribute in argument. More...
 
CepsBool hasAllAttributes (const CepsVector< CepsAttribute > &attributes) const
 Tells if the entity has all the attributes in argument. More...
 
CepsBool hasAllAttributes (const CepsAttribute *attributes, const CepsUInt &n) const
 Tells if the entity has all the attributes in argument. More...
 
template<class _It >
CepsBool hasAllAttributes (_It first, _It last) const
 Tells if the entity has all the attributes in argument. More...
 
CepsBool hasOneOfAttributes (const CepsSet< CepsAttribute > &attributes) const
 Tells if the entity has one of the attributes in argument. More...
 
CepsBool hasOneOfAttributes (const CepsVector< CepsAttribute > &attributes) const
 Tells if the entity has one of the attributes in argument. More...
 
CepsBool hasOneOfAttributes (const CepsAttribute *attributes, const CepsUInt &n) const
 Tells if the entity has one of the attributes in argument. More...
 
template<class _It >
CepsBool hasOneOfAttributes (_It first, _It last) const
 Tells if the entity has one of the attributes in argument. More...
 
CepsBool hasUniversalAttribute () const
 Detect if the current entity has the attribute universal. More...
 
void reset ()
 Equivalent to HoldsAttributes::clear() More...
 

Protected Member Functions

void checkNoAttribute ()
 Stops program if electrode has no attribute. More...
 

Protected Attributes

CepsString m_name
 Electrode identifier. More...
 
CepsReal m_measure
 Size of the electrode. More...
 
- Protected Attributes inherited from ceps::HoldsAttributes
CepsSet< CepsAttributem_attributes
 The attributes held by the entity. More...
 

Constructor & Destructor Documentation

◆ ElectrodeBase() [1/2]

ElectrodeBase::ElectrodeBase ( CepsString  name,
const CepsSet< CepsAttribute > &  attrs,
Geometry geom = nullptr 
)
explicit

Constructor with attributes. Geometry can be passed to set size directly.

Parameters
nameIdentifier
attrsCell attributes defining the electrode domain
geomGeometry with cells

Definition at line 35 of file ElectrodeBase.cpp.

◆ ElectrodeBase() [2/2]

ElectrodeBase::ElectrodeBase ( CepsString  name,
InputParameters params,
Geometry geom = nullptr 
)
explicit

Constructor with parameters from input file. Gets attributes from key "<m_identifier> attributes".

Parameters
nameIdentifier
paramsParameters from input file
geomGeometry with cells

Definition at line 45 of file ElectrodeBase.cpp.

◆ ~ElectrodeBase()

ElectrodeBase::~ElectrodeBase ( )
default

Destructor.

Member Function Documentation

◆ checkNoAttribute()

void ElectrodeBase::checkNoAttribute ( )
protected

Stops program if electrode has no attribute.

Definition at line 97 of file ElectrodeBase.cpp.

◆ computeMeasure()

void ElectrodeBase::computeMeasure ( Geometry geom)

Set the electrode measure in cm or cm^2.

Definition at line 72 of file ElectrodeBase.cpp.

◆ getMeasure()

CepsReal ElectrodeBase::getMeasure ( ) const

Get the electrode measure in cm or cm^2.

Definition at line 66 of file ElectrodeBase.cpp.

◆ getName()

CepsString ElectrodeBase::getName ( ) const

Get electrode label.

Definition at line 60 of file ElectrodeBase.cpp.

◆ setupWithParameters()

void ElectrodeBase::setupWithParameters ( InputParameters params)

Sets options from the parameters.

Definition at line 91 of file ElectrodeBase.cpp.

Field Documentation

◆ m_measure

CepsReal ElectrodeBase::m_measure
protected

Size of the electrode.

Definition at line 91 of file ElectrodeBase.hpp.

◆ m_name

CepsString ElectrodeBase::m_name
protected

Electrode identifier.

Definition at line 90 of file ElectrodeBase.hpp.


The documentation for this class was generated from the following files: