#include <qgprog.h>
Public Member Functions | |
unsigned int | length () const |
The length of the program (number of instructions). | |
QProgramSettings | read (std::istream &stream) throw (Error) |
Read a program from a stream. | |
bool | addInstruction (const std::string &line) throw (Error) |
Append an instruction given as a line of text. | |
bool | addInstruction (QInstr *) throw (Error) |
Append an instruction given as a QInstr object. | |
void | installOracle (const std::string &oracleTT) |
Install the given truth table to all oracle gates in the program. | |
QInstr * | operator[] (unsigned int) throw (Error) |
Return a reference to the addressed instruction. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const QProgram &) |
Basically this stores a vector if QInstr objects and provides functions to read a QProgram from a string or a file. The interface functions as well as the syntax will most likely be changed in the future!
Definition at line 80 of file qgprog.h.
|
Read a program from a stream. Settings provided will be returned. Note that the QProgramSettings object returned may contain empty settings! Definition at line 89 of file qgprog.cpp. |