61 : AppM(_AppM), indented_output_stream(_indented_output_stream),
parameters(_parameters)
71 switch(actor_graph_backend_type)
97 if(statement_string.size())
105 const auto TM =
AppM->get_tree_manager();
106 const auto BH =
AppM->CGetFunctionBehavior(function_id)->CGetBehavioralHelper();
107 const auto fdecl =
tree_helper::PrintType(TM, TM->CGetTreeReindex(function_id),
false,
true,
false,
nullptr,
int debug_level
The debug level.
virtual ~InstructionWriter()
Destructor.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
Definition of the class representing a generic C application.
Class to print indented code.
Simple class to print single instruction.
virtual void write_declarations()
Write code needed for declaration/initialization of auxiliary variables.
Auxiliary methods for manipulating string.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
virtual void Initialize()
Initialize data structure.
Standard functor that returns the name of a variable.
virtual void declareFunction(const unsigned int function_id)
Write the declaration of a function.
void Append(const std::string &str)
Append a string to the output.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Abstract class to write an actor graphs.
const BehavioralHelperConstRef CGetBehavioralHelper() const
Returns the helper associated with the function.
InstructionWriter(const application_managerConstRef AppM, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef parameters)
Constructor; it is protected since factory method should be used.
const application_managerConstRef AppM
The application manager.
void WriteComment(const std::string &text)
Writes a comment.
This file collects some utility functions.
Template definition of refcount.
std::string print_vertex(const OpGraphConstRef g, const vertex v, const var_pp_functorConstRef vppf, const bool dot=false) const
Print the operations corrisponding to the vertex.
ActorGraphBackend_Type
C thread backend to be used.
static InstructionWriterRef CreateInstructionWriter(const ActorGraphBackend_Type actor_graph_backend_type, const application_managerConstRef AppM, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef parameters)
Factory method.
const IndentedOutputStreamRef indented_output_stream
The indented output stream.
const OpGraphConstRef CGetOpGraph(FunctionBehavior::graph_type gt) const
This method returns the operation graphs.
static std::string PrintType(const tree_managerConstRef &TM, const tree_nodeConstRef &type, bool global=false, bool print_qualifiers=false, bool print_storage=false, const tree_nodeConstRef &var=nullptr, const var_pp_functorConstRef &vppf=var_pp_functorConstRef(), const std::string &prefix="", const std::string &tail="")
Print a type and its variable in case var is not zero.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
this class is used to manage the command-line or XML options.
refcount< InstructionWriter > InstructionWriterRef
virtual void write(const FunctionBehaviorConstRef function_behavior, const vertex statement, const var_pp_functorConstRef varFunctor)
Write a statement.
refcount< const var_pp_functor > var_pp_functorConstRef
Class specification of the manager of the tree structures extracted from the raw file.
A brief description of the C++ Header File.
const ParameterConstRef parameters
The set of input parameters.