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::IZIP Class Reference
Inheritance diagram for dss::classic::IZIP:
[legend]
Collaboration diagram for dss::classic::IZIP:
[legend]

Public Member Functions

 IZIP (dss::APIUtil *util)
 
strings List (const char *regexp="")
 List of strings consisting of all names match the regular expression provided in regexp. More...
 
strings List (const string &regexp)
 
void Open (const char *FileName)
 Opens and prepares a ZIP file to be used by the DSS text parser. More...
 
void Open (const string &FileName)
 Opens and prepares a ZIP file to be used by the DSS text parser. More...
 
void Close ()
 Closes the current open ZIP file. More...
 
void Redirect (const char *FileInZip)
 Runs a "Redirect" command inside the current (open) ZIP file. More...
 
void Redirect (const string &FileInZip)
 Runs a "Redirect" command inside the current (open) ZIP file. More...
 
template<typename VectorT = Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
VectorT Extract (const char *FileName)
 Extracts the contents of the file "FileName" from the current (open) ZIP file. More...
 
template<typename VectorT = Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
VectorT Extract (const string &FileName)
 Extracts the contents of the file "FileName" from the current (open) ZIP file. More...
 
bool Contains (const char *Name)
 Check if the given path name is present in the current ZIP file. More...
 
bool Contains (const string &Name)
 Check if the given path name is present in the current ZIP file. More...
 
- 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

◆ Close()

void dss::classic::IZIP::Close ( )
inline

Closes the current open ZIP file.

(API Extension)

◆ Contains() [1/2]

bool dss::classic::IZIP::Contains ( const char *  Name)
inline

Check if the given path name is present in the current ZIP file.

(API Extension)

◆ Contains() [2/2]

bool dss::classic::IZIP::Contains ( const string &  Name)
inline

Check if the given path name is present in the current ZIP file.

(API Extension)

◆ Extract() [1/2]

template<typename VectorT = Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
VectorT dss::classic::IZIP::Extract ( const char *  FileName)
inline

Extracts the contents of the file "FileName" from the current (open) ZIP file.

Returns a byte-string.

(API Extension)

◆ Extract() [2/2]

template<typename VectorT = Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
VectorT dss::classic::IZIP::Extract ( const string &  FileName)
inline

Extracts the contents of the file "FileName" from the current (open) ZIP file.

Returns a byte-string.

(API Extension)

◆ List()

strings dss::classic::IZIP::List ( const char *  regexp = "")
inline

List of strings consisting of all names match the regular expression provided in regexp.

If no expression is provided, all names in the current open ZIP are returned.

See https://regex.sorokin.engineer/en/latest/regular_expressions.html for information on the expression syntax and options.

(API Extension)

◆ Open() [1/2]

void dss::classic::IZIP::Open ( const char *  FileName)
inline

Opens and prepares a ZIP file to be used by the DSS text parser.

Currently, the ZIP format support is limited by what is provided in the Free Pascal distribution. Besides that, the full filenames inside the ZIP must be shorter than 256 characters. The limitations should be removed in a future revision.

(API Extension)

◆ Open() [2/2]

void dss::classic::IZIP::Open ( const string &  FileName)
inline

Opens and prepares a ZIP file to be used by the DSS text parser.

Currently, the ZIP format support is limited by what is provided in the Free Pascal distribution. Besides that, the full filenames inside the ZIP must be shorter than 256 characters. The limitations should be removed in a future revision.

(API Extension)

◆ Redirect() [1/2]

void dss::classic::IZIP::Redirect ( const char *  FileInZip)
inline

Runs a "Redirect" command inside the current (open) ZIP file.

In the current implementation, all files required by the script must be present inside the ZIP, using relative paths. The only exceptions are memory-mapped files.

(API Extension)

◆ Redirect() [2/2]

void dss::classic::IZIP::Redirect ( const string &  FileInZip)
inline

Runs a "Redirect" command inside the current (open) ZIP file.

In the current implementation, all files required by the script must be present inside the ZIP, using relative paths. The only exceptions are memory-mapped files.

(API Extension)


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