38    const std::string 
name()
 const { 
return std::string{ 
m_name }; }
 
   56    virtual void toStream( std::ostream& out ) 
const = 0;
 
   94    virtual std::ostream& fillStream( std::ostream& ) 
const;
 
  102    template <
class OWNER>
 
  132    static std::string_view 
to_view( std::string str );
 
 
  165        other.m_property = 
nullptr;
 
 
  174      if ( 
this != &other ) {
 
  177        other.m_property = 
nullptr;
 
  182        m_value = std::move( other.m_value );
 
 
  205    operator std::string() 
const;
 
 
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
const std::type_info * m_typeinfo
property type
PropertyBase & declareReadHandler(void(HT::*MF)(PropertyBase &), HT *instance)
virtual PropertyBase * clone() const =0
clones the current property
virtual bool load(PropertyBase &dest) const =0
export the property value to the destination
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type
virtual PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for reading
void setSemantics(std::string value)
set the semantics string
virtual bool useUpdateHandler()=0
manual trigger for callback for update
virtual const std::function< void(PropertyBase &)> readCallBack() const =0
get a reference to the readCallBack
void remove(WeakPropertyRef *ref)
const std::type_info * type_info() const
property type-info
void setOwnerType(const std::type_info &ownerType)
set the type of the owner class (used for documentation)
void setDocumentation(std::string value)
set the documentation string
void setOwnerType()
set the type of the owner class (used for documentation)
std::string documentation() const
property documentation
virtual std::string toString() const =0
value -> string
const std::type_info * m_ownerType
type of owner of the property (if defined)
void setName(std::string value)
set the new value for the property name
virtual void toStream(std::ostream &out) const =0
value -> stream
std::string type() const
property type
virtual bool assign(const PropertyBase &source)=0
import the property value form the source
std::string_view m_semantics
property semantics
virtual StatusCode fromString(const std::string &value)=0
string -> value
PropertyBase(std::string name, const std::type_info &type)
constructor from the property name and the type
PropertyBase & operator=(const PropertyBase &)=default
assignment operator
std::set< WeakPropertyRef * > m_weakReferences
void add(WeakPropertyRef *ref)
virtual ~PropertyBase()
virtual destructor
const std::type_info * ownerType() const
get the type of the owner class (used for documentation)
std::string semantics() const
property semantics
std::string_view m_name
property name
PropertyBase & declareUpdateHandler(void(HT::*MF)(PropertyBase &), HT *instance)
std::string_view m_documentation
property doc string
static std::string_view to_view(std::string str)
helper to map a string to a reliable std::string_view
std::string ownerTypeName() const
get the string for the type of the owner class (used for documentation)
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
virtual PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for update
const std::string name() const
property name
virtual const std::function< void(PropertyBase &)> updateCallBack() const =0
get a reference to the updateCallBack
Optional reference to a property that can be used to refer to a sting or to the string representation...
PropertyBase * m_property
WeakPropertyRef & operator=(WeakPropertyRef &&other)
WeakPropertyRef & operator=(const std::string &value)
WeakPropertyRef()=default
WeakPropertyRef(std::string value)
WeakPropertyRef(const WeakPropertyRef &other)=delete
WeakPropertyRef(PropertyBase &property)
WeakPropertyRef(WeakPropertyRef &&other)
WeakPropertyRef & operator=(PropertyBase &value)
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
std::ostream & operator<<(std::ostream &stream, const PropertyBase &prop)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.