RepastHPC  2.3.1
Public Member Functions | List of all members
repast::SVDataSetBuilder Class Reference

Used to build SVDataSets to record data in plain text tabular format. More...

#include <SVDataSetBuilder.h>

Public Member Functions

 SVDataSetBuilder (const std::string &file, const std::string &separator, const Schedule &schedule)
 Creates a SVDataSetBuilder that will create a SVDataSet that will write to the specified file and use the specified string as a data value separator. More...
 
SVDataSetBuilderaddDataSource (SVDataSource *source)
 Adds a DataSource to the DataSet produced by this builder. More...
 
SVDataSetcreateDataSet ()
 Creates the DataSource defined by this builder. More...
 

Detailed Description

Used to build SVDataSets to record data in plain text tabular format.

Steps for use are:

  1. Create a SVDataSetBuilder.
  2. Add SVDataSources to the builder using the createSVDataSource functions. Each data source defines a column in the output and where the data for that column will be retrieved. Recording data on the SVDataSet produced by the builder will record this data for each column.
  3. Call createDataSet to create the SVDataSet.
  4. Schedule calls to record and write on the SVDataSet.

Constructor & Destructor Documentation

◆ SVDataSetBuilder()

repast::SVDataSetBuilder::SVDataSetBuilder ( const std::string &  file,
const std::string &  separator,
const Schedule schedule 
)

Creates a SVDataSetBuilder that will create a SVDataSet that will write to the specified file and use the specified string as a data value separator.

Tick info will be gathered from the specified schedule.

Parameters
filethe file path where the data will be recorded to
separatora string used to separate the data values (e.g. a ",").

Member Function Documentation

◆ addDataSource()

SVDataSetBuilder & repast::SVDataSetBuilder::addDataSource ( SVDataSource source)

Adds a DataSource to the DataSet produced by this builder.

The createDataSource functions can be used to create Data Sources. Each data source defines a column in the output and where the data for that column will be retrieved. Recording data on the SVDataSet produced by the builder will record this data for each column.

Parameters
sourcethe data source to add

◆ createDataSet()

SVDataSet * repast::SVDataSetBuilder::createDataSet ( )

Creates the DataSource defined by this builder.

This can only be called once. The caller is responsible for properly deleting the returned pointer.


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