ImpactX
Loading...
Searching...
No Matches
impactx::elements::mixin::Named Struct Reference

#include <named.H>

Inheritance diagram for impactx::elements::mixin::Named:
impactx::elements::Aperture impactx::elements::Buncher impactx::elements::CFbend impactx::elements::ChrAcc impactx::elements::ChrDrift impactx::elements::ChrPlasmaLens impactx::elements::ChrQuad impactx::elements::ConstF impactx::elements::DipEdge impactx::elements::Drift impactx::elements::ExactCFbend impactx::elements::ExactDrift impactx::elements::ExactMultipole impactx::elements::ExactQuad impactx::elements::ExactSbend impactx::elements::Kicker impactx::elements::LinearMap impactx::elements::Marker impactx::elements::Multipole impactx::elements::NonlinearLens impactx::elements::PRot impactx::elements::PlaneXYRot impactx::elements::Programmable impactx::elements::Quad impactx::elements::QuadEdge impactx::elements::RFCavity impactx::elements::Sbend impactx::elements::ShortRF impactx::elements::SoftQuadrupole impactx::elements::SoftSolenoid impactx::elements::Sol impactx::elements::Source impactx::elements::TaperedPL impactx::elements::ThinDipole

Public Member Functions

AMREX_GPU_HOST void set_name (std::string const &new_name)
 
AMREX_GPU_HOST Named (std::optional< std::string > name)
 
AMREX_GPU_HOST_DEVICE ~Named ()
 
AMREX_GPU_HOST Named (Named const &other)
 
AMREX_GPU_HOST Namedoperator= (Named const &other)
 
AMREX_GPU_HOST_DEVICE Named (Named &&other) noexcept
 
AMREX_GPU_HOST_DEVICE Namedoperator= (Named &&other) noexcept
 
AMREX_FORCE_INLINE std::string name () const
 
AMREX_FORCE_INLINE bool has_name () const
 

Private Attributes

char * m_name = nullptr
 

Detailed Description

This is a helper class for lattice elements with a user-defined name

Constructor & Destructor Documentation

◆ Named() [1/3]

AMREX_GPU_HOST impactx::elements::mixin::Named::Named ( std::optional< std::string > name)
inline

A user-named element

Parameters
namea user defined and not necessarily unique name of the element

◆ ~Named()

AMREX_GPU_HOST_DEVICE impactx::elements::mixin::Named::~Named ( )
inline

◆ Named() [2/3]

AMREX_GPU_HOST impactx::elements::mixin::Named::Named ( Named const & other)
inline

◆ Named() [3/3]

AMREX_GPU_HOST_DEVICE impactx::elements::mixin::Named::Named ( Named && other)
inlinenoexcept

Member Function Documentation

◆ has_name()

AMREX_FORCE_INLINE bool impactx::elements::mixin::Named::has_name ( ) const
inline

Return true if the user provided a name for this element

Returns
true if the user provided a name

◆ name()

AMREX_FORCE_INLINE std::string impactx::elements::mixin::Named::name ( ) const
inline

Return the user provided name of the element

Returns
user defined and not necessarily unique name

◆ operator=() [1/2]

AMREX_GPU_HOST_DEVICE Named & impactx::elements::mixin::Named::operator= ( Named && other)
inlinenoexcept

◆ operator=() [2/2]

AMREX_GPU_HOST Named & impactx::elements::mixin::Named::operator= ( Named const & other)
inline

◆ set_name()

AMREX_GPU_HOST void impactx::elements::mixin::Named::set_name ( std::string const & new_name)
inline

Overwrite the name of the element

Parameters
new_nameset a new name on the element

Member Data Documentation

◆ m_name

char* impactx::elements::mixin::Named::m_name = nullptr
private

The documentation for this struct was generated from the following file: