DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::classic::IParser Class Reference
Inheritance diagram for dss::classic::IParser:
[legend]
Collaboration diagram for dss::classic::IParser:
[legend]

Public Member Functions

 IParser (dss::APIUtil *util)
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Matrix (int32_t ExpectedOrder)
 Use this property to parse a Matrix token in OpenDSS format. More...
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT SymMatrix (int32_t ExpectedOrder)
 Use this property to parse a matrix token specified in lower triangle form. More...
 
template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT Vector (int32_t ExpectedSize)
 Returns token as array of doubles. More...
 
void ResetDelimiters ()
 
bool AutoIncrement ()
 Default is FALSE. More...
 
IParserAutoIncrement (bool value)
 
string BeginQuote ()
 Get/Set String containing the the characters for Quoting in OpenDSS scripts. More...
 
IParserBeginQuote (const char *value)
 
IParserBeginQuote (const string &value)
 
string CmdString ()
 String to be parsed. More...
 
IParserCmdString (const char *value)
 
IParserCmdString (const string &value)
 
double DblValue ()
 Return next parameter as a double.
 
string Delimiters ()
 String defining hard delimiters used to separate token on the command string. More...
 
IParserDelimiters (const char *value)
 
IParserDelimiters (const string &value)
 
string EndQuote ()
 String containing characters, in order, that match the beginning quote characters in BeginQuote. More...
 
IParserEndQuote (const char *value)
 
IParserEndQuote (const string &value)
 
int32_t IntValue ()
 Return next parameter as a long integer.
 
string NextParam ()
 Get next token and return tag name (before = sign) if any. More...
 
string StrValue ()
 Return next parameter as a string.
 
string WhiteSpace ()
 (read) Get the characters used for White space in the command string. More...
 
IParserWhiteSpace (const char *value)
 
IParserWhiteSpace (const string &value)
 
- Public Member Functions inherited from dss::ContextState
 ContextState (APIUtil *util)
 

Additional Inherited Members

- Public Attributes inherited from dss::ContextState
void * ctx
 Pointer to the DSSContext for easy access.
 
APIUtilapi_util
 API utility functions.
 

Member Function Documentation

◆ AutoIncrement()

bool dss::classic::IParser::AutoIncrement ( )
inline

Default is FALSE.

If TRUE parser automatically advances to next token after DblValue, IntValue, or StrValue. Simpler when you don't need to check for parameter names.

◆ BeginQuote()

string dss::classic::IParser::BeginQuote ( )
inline

Get/Set String containing the the characters for Quoting in OpenDSS scripts.

Matching pairs defined in EndQuote. Default is "'([{.

◆ CmdString()

string dss::classic::IParser::CmdString ( )
inline

String to be parsed.

Loading this string resets the Parser to the beginning of the line. Then parse off the tokens in sequence.

◆ Delimiters()

string dss::classic::IParser::Delimiters ( )
inline

String defining hard delimiters used to separate token on the command string.

Default is , and =. The = separates token name from token value. These override whitesspace to separate tokens.

◆ EndQuote()

string dss::classic::IParser::EndQuote ( )
inline

String containing characters, in order, that match the beginning quote characters in BeginQuote.

Default is "')]}

◆ Matrix()

template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT dss::classic::IParser::Matrix ( int32_t  ExpectedOrder)
inline

Use this property to parse a Matrix token in OpenDSS format.

Returns square matrix of order specified. Order same as default Fortran order: column by column.

◆ NextParam()

string dss::classic::IParser::NextParam ( )
inline

Get next token and return tag name (before = sign) if any.

See AutoIncrement.

◆ SymMatrix()

template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT dss::classic::IParser::SymMatrix ( int32_t  ExpectedOrder)
inline

Use this property to parse a matrix token specified in lower triangle form.

Symmetry is forced.

◆ Vector()

template<typename VectorT = Eigen::Matrix<double, Eigen::Dynamic, 1>>
VectorT dss::classic::IParser::Vector ( int32_t  ExpectedSize)
inline

Returns token as array of doubles.

For parsing quoted array syntax.

◆ WhiteSpace()

string dss::classic::IParser::WhiteSpace ( )
inline

(read) Get the characters used for White space in the command string.

Default is blank and Tab. (write) Set the characters used for White space in the command string. Default is blank and Tab.


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