Gyoji Compiler
|
Container for functions. More...
#include <functions.hpp>
Public Member Functions | |
Functions () | |
Construct an empty function table. | |
~Functions () | |
Move along, nothing to see here. | |
void | add_function (Gyoji::owned< Function > _function) |
Add a function to the MIR. | |
const std::vector< Gyoji::owned< Function > > & | get_functions () const |
Returns the list of functions defined. | |
void | dump (FILE *out) const |
Dump the function table to a file handle. | |
Container for functions.
This class is a container for the functions defined in a translation unit.
Functions::Functions | ( | ) |
Construct an empty function table.
This constructs an empty function table.
Functions::~Functions | ( | ) |
Move along, nothing to see here.
Move along, nothing to see here.
void Functions::add_function | ( | Gyoji::owned< Function > | _function | ) |
void Functions::dump | ( | FILE * | out | ) | const |
Dump the function table to a file handle.
This method dumps the "Functions" portion of the MIR to the given file handle.
const std::vector< Gyoji::owned< Function > > & Functions::get_functions | ( | ) | const |
Returns the list of functions defined.
This method returns the list of functions defined in this function table. The list is returned as an immutable reference to owned pointers. The caller may not aquire ownership through this method, but may get access to the functions by de-referencing the pointer. The pointer is guaranteed to be valid because this container owns them and they cannot be removed once created. The returned reference must not live longer than this container.