Template Class EntityWithMetadata¶
Defined in File EntityWithMetadata.hpp
Inheritance Relationships¶
Base Type¶
public nix::base::NamedEntity< T >
(Template Class NamedEntity)
Derived Type¶
public nix::base::EntityWithSources< T >
(Template Class EntityWithSources)
Class Documentation¶
-
template<typename T>
class EntityWithMetadata : public nix::base::NamedEntity<T>¶ Base class for entities that can be associated with additional metadata.
The data part of the NIX data model consists of five main elements which all inherit from nix::base::EntityWithMetadata: nix::Block, nix::DataArray, nix::MultiTag, nix::Tag, and nix::Source that serve different purposes. Common to all those entities is an optional property metadata which provides a link to a nix::Section entity and therefore makes it possible to annotate the entities with additional metadata.
Subclassed by nix::base::EntityWithSources< T >
Public Functions
-
inline EntityWithMetadata()¶
Constructor that creates a null entity.
Constructor that creates a new entity from a shared pointer to an implementation instance.
Constructor with move semantics that creates a new entity from a shared pointer to an implementation instance.
-
inline Section metadata() const¶
Get metadata associated with this entity.
- Returns
The associated section, if no such section exists an uninitialized nix::Section will be returned.
-
inline void metadata(const Section &metadata)¶
Associate the entity with some metadata.
Calling this method will replace previously stored information.
- Parameters
metadata – The nix::Section that should be associated with this entity.
-
inline void metadata(const std::string &id)¶
Associate the entity with some metadata.
Calling this method will replace previously stored information.
- Parameters
id – The id of the nix::Section that should be associated with this entity.
-
inline void metadata(const none_t t)¶
Remove associated metadata from the entity.
This method just removes the association between the respective nix::Section but will not remove it from the file.
- Parameters
t – None
-
inline virtual ~EntityWithMetadata()¶
Destructor
-
inline EntityWithMetadata()¶