This class defines the interface for sending data to the engine for writing.
More...
#include <writer.h>
Static Private Member Functions |
static bool | is_w_type (int inval) |
| Writes the current data to a file.
|
Private Attributes |
std::list< std::shared_ptr
< const data > > | dvals |
| Holds each data point.
|
std::map< int, bool > | will_write |
| Maps enum parameters to a bool deciding whether that label will write or not.
|
Detailed Description
This class defines the interface for sending data to the engine for writing.
Definition at line 28 of file writer.h.
Member Enumeration Documentation
Labels for various input types.
- Enumerator:
FINAL_SCORE |
|
FINAL_FUNC |
|
INTERMEDIATE_FUNC |
|
INTERMEDIATE_SCORE |
|
INDEX |
|
PARAMETER |
|
OTHER |
|
BEGIN |
|
END |
|
Definition at line 39 of file writer.h.
Constructor & Destructor Documentation
writer::writer |
( |
bool |
def = true | ) |
|
This creates a new writer class with all of the type rules set to def
- Parameters
-
def | The default rule for all of the types |
Definition at line 44 of file writer.cpp.
writer::writer |
( |
const std::map< int, bool > & |
writevals, |
|
|
bool |
def = true |
|
) |
| |
This constructs a writer that has the same rules as the map writevals, with any rule that isn't in writevals set to def
- Parameters
-
writevals | The current set of rules being used |
def | The default rule for values not mapped by writevals |
Definition at line 57 of file writer.cpp.
Member Function Documentation
void writer::add_data |
( |
std::shared_ptr< const data > |
inval, |
|
|
const w_type |
dat_t |
|
) |
| |
|
virtual |
This functions adds the data to the list of values to be written, as long as the rule corresponding to the type is set to true
- Parameters
-
inval | The data to be saved |
dat_t | The type of the input data |
Definition at line 26 of file writer.cpp.
bool writer::is_w_type |
( |
int |
inval | ) |
|
|
staticprivate |
Writes the current data to a file.
Definition at line 67 of file writer.cpp.
void writer::set_rule |
( |
w_type |
inval, |
|
|
bool |
rule |
|
) |
| |
This functions sets the rule for the input type
- Parameters
-
inval | The type which is having a rule reset |
rule | the new rule for the type |
Definition at line 36 of file writer.cpp.
void writer::write |
( |
std::ostream & |
ofile | ) |
const |
|
virtual |
Friends And Related Function Documentation
Member Data Documentation
std::list<std::shared_ptr<const data> > writer::dvals |
|
private |
Holds each data point.
Definition at line 30 of file writer.h.
std::map<int, bool> writer::will_write |
|
private |
Maps enum parameters to a bool deciding whether that label will write or not.
Definition at line 32 of file writer.h.
The documentation for this class was generated from the following files: