Go to the documentation of this file.
18 #include <nlohmann/json.hpp>
28 template <
typename Arg,
typename =
void>
30 template <
typename Arg>
32 template <
typename Arg>
36 template <
typename Arg,
typename =
void>
38 template <
typename Arg>
40 Arg,
std::void_t<decltype( mergeAndReset( std::declval<Arg&>(), std::declval<Arg&>() ) )>> :
std::true_type {};
41 template <
typename Arg>
76 if constexpr ( details::has_reset_method_v<T> ) {
reset( *
reinterpret_cast<T*
>( ptr ) ); }
79 if constexpr ( details::has_mergeAndReset_method_v<T> ) {
80 mergeAndReset( *
reinterpret_cast<T*
>( e ), *
reinterpret_cast<T*
>( o ) );
139 template <
typename T>
147 template <
typename T>
constexpr bool has_reset_method_v
Interface reporting services must implement.
void(* m_mergeAndReset)(void *, void *)
function calling merge and reset on internal data with the internal data of another entity
std::string name
name of the entity
std::vector< Sink * > m_sinks
friend void to_json(nlohmann::json &j, Gaudi::Monitoring::Hub::Entity const &e)
conversion to json via nlohmann library
virtual void removeEntity(Entity const &ent)=0
bool operator==(Entity const &ent) const
operator== for comparison with an entity
AttribStringParser::Iterator begin(const AttribStringParser &parser)
virtual void registerEntity(Entity ent)=0
void removeSink(Sink *sink)
nlohmann::json(* m_getJSON)(void const *)
function converting the internal data to json.
void registerEntity(std::string c, std::string n, std::string t, T &ent)
std::type_index typeIndex() const
function to get internal type
void removeEntity(T &ent)
void * id() const
unique identifier, actually mapped to internal pointer
constexpr bool has_mergeAndReset_method_v
std::type_index m_typeIndex
void registerEntity(Entity ent)
void * m_ptr
pointer to the actual data inside this Entity
friend void mergeAndReset(Entity const &ent, Entity const &other)
function calling merge and reset on internal data with the internal data of another entity
Entity(std::string component, std::string name, std::string type, T &ent)
std::map< void *, Entity > m_entities
Central entity in a Gaudi application that manages monitoring objects (i.e.
friend void reset(Entity const &e)
function resetting internal data
Wrapper class for arbitrary monitoring objects.
void(* m_reset)(void *)
function reseting internal data.
std::string type
type of the entity, see comment above concerning its format and usage
std::string component
name of the component owning the Entity