My Project
Public Member Functions | List of all members
Dataflow::DFlib_Impl Class Reference

Public Member Functions

 DFlib_Impl ()
 Default constructor (empty library).
 
 DFlib_Impl (const string &filename)
 Constructor from a file. More...
 
bool add (const string &filename)
 Adds new functions to the library. More...
 
bool writeDot (const std::string &filename="")
 Writes the dataflow library in dot format. More...
 
bool writeDot (std::ostream &s)
 Writes the dataflow library in dot format. More...
 
void setError (const std::string &err)
 Sets an error message for the library. More...
 
const std::string & getError () const
 
std::string & getError ()
 
void clearError ()
 Erases the error.
 
bool hasError () const
 Indicates whether there is an error. More...
 
int numFuncs () const
 
funcID getFuncID (const string &fname) const
 Gets a funcID from a name function. More...
 
DFnetlistoperator[] (const string &fname)
 Returns a reference to the dataflow netlist of a function. More...
 
const DFnetlistoperator[] (const string &fname) const
 Returns a const reference to the dataflow netlist of a function. More...
 
DFnetlistoperator[] (funcID id)
 Returns a reference to the dataflow netlist of a function. More...
 
const DFnetlistoperator[] (funcID id) const
 Returns a const reference to the dataflow netlist of a function. More...
 

Constructor & Destructor Documentation

◆ DFlib_Impl()

DFlib_Impl::DFlib_Impl ( const string &  filename)

Constructor from a file.

Parameters
filenameName of the file (dot format).

Member Function Documentation

◆ add()

bool DFlib_Impl::add ( const string &  filename)

Adds new functions to the library.

Parameters
filenameName of the file (dot format).
Returns
True if successful, and false if an error is produced.

◆ getError() [1/2]

const std::string& Dataflow::DFlib_Impl::getError ( ) const
inline
Returns
The error message associated to the netlist.

◆ getError() [2/2]

std::string& Dataflow::DFlib_Impl::getError ( )
inline
Returns
The error message associated to the netlist.

◆ getFuncID()

funcID Dataflow::DFlib_Impl::getFuncID ( const string &  fname) const
inline

Gets a funcID from a name function.

Parameters
fnameName of the function.
Returns
The funcID (invalidDataflowID if it does not exist).

◆ hasError()

bool Dataflow::DFlib_Impl::hasError ( ) const
inline

Indicates whether there is an error.

Returns
True if there is an error and false otherwise.

◆ numFuncs()

int Dataflow::DFlib_Impl::numFuncs ( ) const
inline
Returns
The number of functions of the library.

◆ operator[]() [1/4]

DFnetlist& Dataflow::DFlib_Impl::operator[] ( const string &  fname)
inline

Returns a reference to the dataflow netlist of a function.

Parameters
fnameName of the function.
Returns
A reference to the dataflow netlist of the function.

◆ operator[]() [2/4]

const DFnetlist& Dataflow::DFlib_Impl::operator[] ( const string &  fname) const
inline

Returns a const reference to the dataflow netlist of a function.

Parameters
fnameName of the function.
Returns
A const reference to the dataflow netlist of the function.

◆ operator[]() [3/4]

DFnetlist& Dataflow::DFlib_Impl::operator[] ( funcID  id)
inline

Returns a reference to the dataflow netlist of a function.

Parameters
idId of the function.
Returns
A reference to the dataflow netlist of the function.

◆ operator[]() [4/4]

const DFnetlist& Dataflow::DFlib_Impl::operator[] ( funcID  id) const
inline

Returns a const reference to the dataflow netlist of a function.

Parameters
idId of the function.
Returns
A const reference to the dataflow netlist of the function.

◆ setError()

void Dataflow::DFlib_Impl::setError ( const std::string &  err)
inline

Sets an error message for the library.

Parameters
errThe error message

◆ writeDot() [1/2]

bool Dataflow::DFlib_Impl::writeDot ( const std::string &  filename = "")

Writes the dataflow library in dot format.

Parameters
filenameThe name of the file. In case the filename is empty, it is written into cout.
Returns
true if successful, and false otherwise.

◆ writeDot() [2/2]

bool Dataflow::DFlib_Impl::writeDot ( std::ostream &  s)

Writes the dataflow library in dot format.

Parameters
sThe output stream.
Returns
True if successful, and false otherwise.

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