Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AttrRecorderInterface Class Referenceabstract

#include <AttrRecorderInterface.h>

Inheritance diagram for AttrRecorderInterface:
Inheritance graph
[legend]

Public Member Functions

void record_triple (const char *name, double a, double b, double c)
 
void record_triple (const char *name, int a, int b, int c)
 
virtual void record_arr (const char *name, const double *arr, int length)=0
 
virtual void record_arr (const char *name, const int *arr, int length)=0
 
virtual void record_arr (const char *name, const long *arr, int length)=0
 
virtual void record (const char *name, const char *val)=0
 
virtual void record (const char *name, double val)=0
 
virtual void record (const char *name, int val)=0
 
virtual void record (const char *name, long val)=0
 

Detailed Description

Abstract class that provides the interface for recording file header information

The expectation is that logic for serializing attribute information to different formats will be organized into different subclasses. For example, we might define an HDF5 class and a Text class.

Note
For less experienced C++ devs:
  • virtual methods can be overridden by subclasses
  • a pure virtual method doesn't provide a default implementation. If you try to initialize a subclass that doesn't override the methods, the program won't compile
  • virtual methods with default implementations don't need to be overriden (in the context of this class, they may be implemented in terms of other virtual methods)

Member Function Documentation

◆ record()

virtual void AttrRecorderInterface::record ( const char *  name,
const char *  val 
)
pure virtual

record a scalar attribute

Implemented in TextAttrRecorder.

◆ record_arr()

virtual void AttrRecorderInterface::record_arr ( const char *  name,
const double *  arr,
int  length 
)
pure virtual

record a 1d array of values

Implemented in TextAttrRecorder.

◆ record_triple()

void AttrRecorderInterface::record_triple ( const char *  name,
double  a,
double  b,
double  c 
)
inline

A convenience method for recording 3 doubles


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