Pothos  0.7.0-gf7fbae99
The Pothos dataflow programming software suite
Public Member Functions | List of all members
Pothos::Util::BlockDescriptionParser Class Reference

#include <BlockDescription.hpp>

Public Member Functions

 BlockDescriptionParser (void)
 Create an empty block description parser. More...
 
void feedStream (std::istream &is)
 
void feedFilePath (const std::string &filePath)
 
std::vector< std::string > listFactories (void) const
 
std::string getJSONArray (const size_t indent=0) const
 
std::string getJSONObject (const std::string &factoryPath, const size_t indent=0) const
 

Detailed Description

Parse multiple sources for block description markup and manages the resulting JSON descriptions.

Constructor & Destructor Documentation

◆ BlockDescriptionParser()

Pothos::Util::BlockDescriptionParser::BlockDescriptionParser ( void  )

Create an empty block description parser.

Member Function Documentation

◆ feedFilePath()

void Pothos::Util::BlockDescriptionParser::feedFilePath ( const std::string &  filePath)

Feed the parser a source file with embedded markup.

Parameters
filePaththe path to a source file
Exceptions
SyntaxExceptionif the parsing failed
FileExceptionfor file access errors

◆ feedStream()

void Pothos::Util::BlockDescriptionParser::feedStream ( std::istream &  is)

Feed the parser a source file with embedded markup.

Parameters
isan input stream like an open file
Exceptions
SyntaxExceptionif the parsing failed

◆ getJSONArray()

std::string Pothos::Util::BlockDescriptionParser::getJSONArray ( const size_t  indent = 0) const

Get a JSON array containing all block descriptions.

Returns
a string containing a JSON array

◆ getJSONObject()

std::string Pothos::Util::BlockDescriptionParser::getJSONObject ( const std::string &  factoryPath,
const size_t  indent = 0 
) const

Get a JSON object for a single block description.

Parameters
factoryPatha discovered factory path
indentindentation level for formatting
Returns
a string containing a JSON object

◆ listFactories()

std::vector<std::string> Pothos::Util::BlockDescriptionParser::listFactories ( void  ) const

Get all factories that were discovered when parsing.


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