Stores pulsar parameters as uninterpreted text. More...

#include <TextParameters.h>

Inheritance diagram for Pulsar::TextParameters:
Pulsar::Parameters Reference::Able Reference::HeapTracked

Public Member Functions

Parametersclone () const
 Return a new, copy constructed instance of self.
bool equals (const Parameters *that) const
 Return true if *this == *that.
void load (FILE *)
 Load from an open stream.
void unload (FILE *) const
 Unload to an open stream.
std::string get_name () const
 Return the pulsar name.
void set_text (const std::string &t)
 Set the text.
std::string get_value (const std::string &keyword) const
 Retrieve a string from the text.
template<typename T>
bool get_value (T &value, const std::string &keyword, bool exception=true) const
 Retrieve a value from the text, return true if found.
template<typename T>
get (const std::string &keyword) const
 Return a value from the text, throw exeception if not found.
Public Member Functions inherited from Pulsar::Parameters
void load (const std::string &filename)
 Load from the named file.
void unload (const std::string &filename) const
 Unload to the named file.
Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 Able (const Able &)
 Copy constructor.
Ableoperator= (const Able &)
 Assignment operator.
virtual ~Able ()
 Destructor.
unsigned get_reference_count () const
 Returns the number of references there are to this.
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 HeapTracked (const HeapTracked &)
 Copy constructor.
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
virtual ~HeapTracked ()
 Destructor.
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.

Protected Member Functions

void parse_rows () const
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object.
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object.

Protected Attributes

std::string text
std::vector< Row > rows

Additional Inherited Members

Static Public Member Functions inherited from Pulsar::Parameters
static void children (std::vector< Reference::To< Parameters > > &)
 Factory helper creates a vector of pointers to derived class instances.
Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
static void operator delete (void *location)
 Regular delete overload.
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
Static Public Attributes inherited from Pulsar::Parameters
static bool verbose = 0
 Verbosity flag.

Detailed Description

Stores pulsar parameters as uninterpreted text.

Member Function Documentation

◆ clone()

Pulsar::Parameters * Pulsar::TextParameters::clone ( ) const
virtual

Return a new, copy constructed instance of self.

Implements Pulsar::Parameters.

◆ equals()

bool Pulsar::TextParameters::equals ( const Parameters * that) const
virtual

Return true if *this == *that.

Implements Pulsar::Parameters.

References equals().

Referenced by equals().

◆ get_name()

string Pulsar::TextParameters::get_name ( ) const
virtual

Return the pulsar name.

Reimplemented from Pulsar::Parameters.

References get_value().

◆ get_value() [1/2]

string Pulsar::TextParameters::get_value ( const std::string & keyword) const
virtual

Retrieve a string from the text.

Reimplemented from Pulsar::Parameters.

Referenced by get(), get_name(), get_value(), and Tempo::Predict::set_parameters().

◆ get_value() [2/2]

template<typename T>
bool Pulsar::TextParameters::get_value ( T & value,
const std::string & keyword,
bool exception = true ) const

Retrieve a value from the text, return true if found.

Retrieve a value from the text.

References get_value().

◆ load()

void Pulsar::TextParameters::load ( FILE * fptr)
virtual

Load from an open stream.

Implements Pulsar::Parameters.

◆ unload()

void Pulsar::TextParameters::unload ( FILE * fptr) const
virtual

Unload to an open stream.

Implements Pulsar::Parameters.


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

Generated using doxygen 1.14.0