# TTTT Analysis: fv::ObservedValue< T > Class Template Reference

fv::ObservedValue< T > Class Template Reference

A generic, observed, value. More...

`#include <value.hpp>`

Inheritance diagram for fv::ObservedValue< T >:
[legend]
Collaboration diagram for fv::ObservedValue< T >:
[legend]

## Public Member Functions

| ObservedValue (const std::string &name, T *val_ref, const std::string &alias="")
T & | get_value ()
| Calculate, if necessary, and return the value held by this object.
Public Member Functions inherited from fv::Value< T >
| Value (const std::string &name, const std::string &alias="")
Public Member Functions inherited from fv::GenValue
| GenValue (const std::string &name, const std::string &alias)
const std::string & | get_name ()

## Private Member Functions

void | _reset ()
| Mark the internal value as invalid. More...
void | verify_integrity ()
| This function serves to check that this Value has been created with real, i.e. More...

## Private Attributes

T * | val_ref

## Additional Inherited Members

Static Public Member Functions inherited from fv::GenValue
static void | reset ()
static GenValue * | get_value (const std::string &name)
static void | alias (const std::string &name, GenValue *value)
static GenValue * | alias (const std::string &name)
static std::string | summary ()
Static Protected Attributes inherited from fv::GenValue
static std::map< const std::string, GenValue * > | values
| A static mapping containing all created Value objects. More...
static std::map< const std::string, GenValue * > | aliases
| Composite value names are typically nested. More...

## Detailed Description

### template<typename T>
class fv::ObservedValue< T >

A generic, observed, value.

An ObservedValue is the interface to your dataset. Upon creation, an ObservedValue is given a pointer to an object of type T. When an observation is loaded into memory, the value at the location referenced by that pointer must be updated with the associated data from that observation. This is the responsibility of whatever DataSet implementation is being used. This object then will read that data and return it when requested.

## Member Function Documentation

## _reset()

template<typename T >

void fv::ObservedValue< T >::_reset | ( |  | ) |

inlineprivatevirtual

Mark the internal value as invalid.

This is needed for DerivedValue to force a recalculation of the internal value when a new observation is loaded into memory. It is called automatically for all GenValue objects when reset is called.

Implements fv::GenValue.

## verify_integrity()

template<typename T >

void fv::ObservedValue< T >::verify_integrity | ( |  | ) |

inlineprivatevirtual

This function serves to check that this Value has been created with real, i.e.

non null, arguments. This is to avoid segfaulting when a dynamic_cast fails. If no checks need to be made, simple override this method with a no-op. If checks fail, the function should utilize the CRITICAL macro with a meaningfull error message stating what failed and especially the name of the current value.

Implements fv::GenValue.

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

- /home/caleb/Sources/TTTT/filval/value.hpp