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

Public Member Functions

 DFlib ()
 Implementation of DFlib;. More...
 
 ~DFlib ()
 Deafult destructor.
 
 DFlib (const std::string &name)
 Constructor. It creates dataflow library from a file (dot format). More...
 
bool add (const std::string &filename)
 Adds new functions to the library. More...
 
bool writeDot (const std::string &filename="")
 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
 
void clearError ()
 Erases the error.
 
bool hasError () const
 Indicates whether there is an error. More...
 
int numFuncs () const
 
funcID getFuncID (const std::string &fname) const
 Gets a funcID from a name function. More...
 
DFnetlistoperator[] (const std::string &fname)
 Returns a reference to the dataflow netlist of a function. More...
 
const DFnetlistoperator[] (const std::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() [1/2]

DFlib::DFlib ( )

Implementation of DFlib;.

Default constructor.

◆ DFlib() [2/2]

DFlib::DFlib ( const std::string &  name)

Constructor. It creates dataflow library from a file (dot format).

Parameters
nameName of the file.

Member Function Documentation

◆ add()

bool DFlib::add ( const std::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()

const string & DFlib::getError ( ) const
Returns
The error message associated to the netlist.

◆ getFuncID()

funcID DFlib::getFuncID ( const std::string &  fname) const

Gets a funcID from a name function.

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

◆ hasError()

bool DFlib::hasError ( ) const

Indicates whether there is an error.

Returns
True if there is an error and false otherwise.

◆ numFuncs()

int DFlib::numFuncs ( ) const
Returns
The number of functions of the library.

◆ operator[]() [1/4]

DFnetlist & DFlib::operator[] ( const std::string &  fname)

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 & DFlib::operator[] ( const std::string &  fname) const

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 & DFlib::operator[] ( funcID  id)

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 & DFlib::operator[] ( funcID  id) const

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 DFlib::setError ( const std::string &  err)

Sets an error message for the library.

Parameters
errThe error message

◆ writeDot()

bool DFlib::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.

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