Function Struct Reference

#include <dds_generator.h>

Collaboration diagram for Function:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Function (const char *name, const char *returntype)
void addArg (const char *name, const std::string &type)
void endArgs ()
 ~Function ()

Public Attributes

bool has_arg_
std::string preamble_

Detailed Description

Definition at line 180 of file dds_generator.h.


Constructor & Destructor Documentation

Function::Function ( const char *  name,
const char *  returntype 
) [inline]

Definition at line 184 of file dds_generator.h.

References be_global, and ACE_String_Base< ACE_CHAR_T >::c_str().

00185     : has_arg_(false)
00186   {
00187     using std::string;
00188     ACE_CString ace_exporter = be_global->export_macro();
00189     bool use_exp = ace_exporter != "";
00190     string exporter = use_exp ? (string(" ") + ace_exporter.c_str()) : "";
00191     be_global->header_ << ace_exporter << (use_exp ? "\n" : "")
00192       << returntype << " " << name << "(";
00193     be_global->impl_ << returntype << " " << name << "(";
00194   }

Here is the call graph for this function:

Function::~Function (  )  [inline]

Definition at line 214 of file dds_generator.h.

References be_global.

00215   {
00216     be_global->impl_ << "}\n\n";
00217   }


Member Function Documentation

void Function::addArg ( const char *  name,
const std::string &  type 
) [inline]

Definition at line 196 of file dds_generator.h.

References be_global, has_arg_, and preamble_.

Referenced by marshal_generator::gen_enum(), v8_generator::gen_struct(), metaclass_generator::gen_struct(), marshal_generator::gen_struct(), v8_generator::gen_typedef(), metaclass_generator::gen_typedef(), v8_generator::gen_union(), metaclass_generator::gen_union(), and marshal_generator::gen_union().

00197   {
00198     std::string sig = (has_arg_ ? ", " : "") + type + (name[0] ? " " : "")
00199       + (name[0] ? name : "");
00200     be_global->header_ << sig;
00201     be_global->impl_ << sig;
00202     if (name[0]) {
00203       preamble_ += "  ACE_UNUSED_ARG(" + std::string(name) + ");\n";
00204     }
00205     has_arg_ = true;
00206   }

Here is the caller graph for this function:

void Function::endArgs (  )  [inline]

Member Data Documentation

Definition at line 181 of file dds_generator.h.

Referenced by addArg().

std::string Function::preamble_

Definition at line 182 of file dds_generator.h.

Referenced by addArg(), and endArgs().


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1