Atoms Crowd  7.0.0
AtomsCore::Metadata Class Referenceabstract

Base Metadata class. More...

#include <Metadata.h>

Inheritance diagram for AtomsCore::Metadata:
AtomsCore::ArrayMetadata AtomsCore::BaseTypedArrayMetadata AtomsCore::MapMetadata AtomsCore::MetadataImpl< T > AtomsCore::TypedArrayMetadata< T >

Public Member Functions

virtual std::string typeStr () const =0
 Type string. More...
 
virtual unsigned int typeId () const =0
 Type id. More...
 
 Metadata ()
 constructor
 
virtual ~Metadata ()=0
 Virtual destructor.
 
virtual void copy (Metadata *)=0
 copy value More...
 
virtual AtomsPtr< Metadataclone () const =0
 clone object More...
 
virtual size_t memSize () const =0
 Memory size. More...
 
virtual bool setWithValuesAndWeights (const std::vector< AtomsPtr< Metadata >> &values, const std::vector< double > &weights)
 Set with weighted values.
 
virtual bool setWithValuesAndWeights (const std::vector< Metadata * > &values, const std::vector< double > &weights)
 
virtual void hash (MurmurHash3 &hasher) const =0
 Hash function.
 
virtual bool isEqual (Metadata *right, double err=0.0) const
 Equal function.
 
virtual bool isGreater (Metadata *right) const
 
virtual bool isLess (Metadata *right) const
 
virtual bool isArray () const
 
virtual void * dataPtr ()=0
 
virtual bool serialise (Archive &outArchive) const =0
 Serialise.
 
virtual bool deserialise (Archive &inArchive)=0
 Deserialise.
 
virtual void toString (std::stringstream &ss) const =0
 String conversion.
 

Detailed Description

Base Metadata class.

The metadata is a generic data container. This is the base class for all derived metadata type.

Member Function Documentation

◆ clone()

virtual AtomsPtr<Metadata> AtomsCore::Metadata::clone ( ) const
pure virtual

clone object

Clone the obj. It returns a shared pointer to the new allocated object

Implemented in AtomsCore::BaseTypedArrayMetadata, AtomsCore::TypedArrayMetadata< T >, AtomsCore::MetadataImpl< T >, AtomsCore::MapMetadata, and AtomsCore::ArrayMetadata.

◆ copy()

virtual void AtomsCore::Metadata::copy ( Metadata )
pure virtual

copy value

Virtual function to copy the value from one metadata to another using base pointer.

Implemented in AtomsCore::TypedArrayMetadata< T >, AtomsCore::MetadataImpl< T >, AtomsCore::MapMetadata, AtomsCore::ArrayMetadata, and AtomsCore::BaseTypedArrayMetadata.

◆ memSize()

◆ typeId()

virtual unsigned int AtomsCore::Metadata::typeId ( ) const
pure virtual

Type id.

Used as replace to the RTTI to get the class name in the derived classes

Returns
Class type id

Implemented in AtomsCore::BaseTypedArrayMetadata, AtomsCore::TypedArrayMetadata< T >, AtomsCore::MetadataImpl< T >, AtomsCore::MapMetadata, and AtomsCore::ArrayMetadata.

◆ typeStr()

virtual std::string AtomsCore::Metadata::typeStr ( ) const
pure virtual

Type string.

Used as replace to the RTTI to get the class name in the derived classes

Returns
Class type string

Implemented in AtomsCore::BaseTypedArrayMetadata, AtomsCore::TypedArrayMetadata< T >, AtomsCore::MetadataImpl< T >, AtomsCore::MapMetadata, and AtomsCore::ArrayMetadata.


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