C++ API Reference RNBO: RNBO::DataRefList Class Reference

RNBO: RNBO::DataRefList Class Reference

#include <RNBO_DataRefList.h>

Public Member Functions

 DataRefList (std::string jsonString)
 
size_t size ()
 
std::string datarefIdAtIndex (size_t index)
 
std::string datarefLocationAtIndex (size_t index)
 
DataRefType datarefTypeAtIndex (size_t index)
 

Detailed Description

Wrapper class for exported RNBO dependencies. After reading a dependencies.json file as a string, use this class to retrieve data ref description information.

#include <fstream>
#include <sstream>
// Read in the dependencies.json file as a std::string
std::ifstream t("../dependencies.json");
std::stringstream buffer;
buffer << t.rdbuf();
// Parse dependencies into a RNBO DataRefList
DataRefList list(buffer.str());

Member Function Documentation

◆ datarefIdAtIndex()

std::string RNBO::DataRefList::datarefIdAtIndex ( size_t  index)

Get the ID of the data ref at the given index.

std::string idstr = list.datarefIdAtIndex(i);

◆ datarefLocationAtIndex()

std::string RNBO::DataRefList::datarefLocationAtIndex ( size_t  index)

Get the path of the data ref at the given index. Can be a URL or a file path.

std::string location = list.datarefLocationAtIndex(i);

◆ datarefTypeAtIndex()

DataRefType RNBO::DataRefList::datarefTypeAtIndex ( size_t  index)

Get the RNBO::DataRefType of the data ref at the given index.

DataRefType type = list.datarefTypeAtIndex(i);

◆ size()

size_t RNBO::DataRefList::size ( )

Number of data refs in the list.


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