Pothos  0.7.0-gf7fbae99
The Pothos dataflow programming software suite
Public Member Functions | Static Public Member Functions | List of all members
Pothos::Archive::ArchiveEntry Class Referenceabstract

#include <ArchiveEntry.hpp>

Inheritance diagram for Pothos::Archive::ArchiveEntry:
Inheritance graph
[legend]

Public Member Functions

 ArchiveEntry (const std::type_info &type, const std::string &id)
 Create and register an entry given the type and unique ID. More...
 
virtual ~ArchiveEntry (void)
 Virtual destructor for derived type classes. More...
 
virtual void save (OStreamArchiver &ar, const void *t) const =0
 Save a pointer to the archive in a derived class. More...
 
virtual void * load (IStreamArchiver &ar) const =0
 Load a pointer from the archive in a derived class. More...
 
const std::string & getId (void) const
 Get the associated unique ID. More...
 
const unsigned long long & getHash (void) const
 Get a reproducible hash for this entry. More...
 

Static Public Member Functions

static const ArchiveEntryfind (const std::type_info &type)
 Lookup the entry given the type info or throw if not found. More...
 
static const ArchiveEntryfind (const std::string &id)
 Lookup the entry given the unique id or throw if not found. More...
 
static const ArchiveEntryfind (const unsigned long long &hash)
 Lookup the entry given the the id hash or throw if not found. More...
 

Detailed Description

Base class for an archive entry. Stores and ID and overloads for polymorphic support.

Constructor & Destructor Documentation

◆ ArchiveEntry()

Pothos::Archive::ArchiveEntry::ArchiveEntry ( const std::type_info &  type,
const std::string &  id 
)

Create and register an entry given the type and unique ID.

◆ ~ArchiveEntry()

virtual Pothos::Archive::ArchiveEntry::~ArchiveEntry ( void  )
virtual

Virtual destructor for derived type classes.

Member Function Documentation

◆ find() [1/3]

static const ArchiveEntry& Pothos::Archive::ArchiveEntry::find ( const std::type_info &  type)
static

Lookup the entry given the type info or throw if not found.

◆ find() [2/3]

static const ArchiveEntry& Pothos::Archive::ArchiveEntry::find ( const std::string &  id)
static

Lookup the entry given the unique id or throw if not found.

◆ find() [3/3]

static const ArchiveEntry& Pothos::Archive::ArchiveEntry::find ( const unsigned long long &  hash)
static

Lookup the entry given the the id hash or throw if not found.

◆ getHash()

const unsigned long long & Pothos::Archive::ArchiveEntry::getHash ( void  ) const
inline

Get a reproducible hash for this entry.

◆ getId()

const std::string & Pothos::Archive::ArchiveEntry::getId ( void  ) const
inline

Get the associated unique ID.

◆ load()

virtual void* Pothos::Archive::ArchiveEntry::load ( IStreamArchiver ar) const
pure virtual

Load a pointer from the archive in a derived class.

Implemented in Pothos::Archive::ArchiveEntryT< T >.

◆ save()

virtual void Pothos::Archive::ArchiveEntry::save ( OStreamArchiver ar,
const void *  t 
) const
pure virtual

Save a pointer to the archive in a derived class.

Implemented in Pothos::Archive::ArchiveEntryT< T >.


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