OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Public Attributes | List of all members
Function Struct Reference

#include <dds_generator.h>

Collaboration diagram for Function:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

bool has_arg_
 
std::string preamble_
 
bool extra_newline_
 

Detailed Description

Definition at line 261 of file dds_generator.h.

Constructor & Destructor Documentation

◆ Function()

Function::Function ( const std::string &  name,
const std::string  returntype,
const char *  template_args = 0 
)
inline

Definition at line 266 of file dds_generator.h.

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

268  : has_arg_(false)
269  , extra_newline_(true)
270  {
271  using std::string;
272  if (template_args) {
273  const string tmpl = string("template<") + template_args + "> ";
274  be_global->header_ << tmpl;
275  be_global->impl_ << tmpl;
276  }
277  ACE_CString ace_exporter = be_global->export_macro();
278  bool use_exp = ace_exporter != "";
279  string exporter = use_exp ? (string(" ") + ace_exporter.c_str()) : "";
280  be_global->header_ << ace_exporter << (use_exp ? "\n" : "")
281  << returntype << " " << name << "(";
282  be_global->impl_ << returntype << " " << name << "(";
283  }
const char * c_str(void) const
bool extra_newline_
bool has_arg_
const char *const name
Definition: debug.cpp:60
BE_GlobalData * be_global
Definition: be_global.cpp:44

◆ ~Function()

Function::~Function ( )
inline

Definition at line 303 of file dds_generator.h.

References be_global.

304  {
305  be_global->impl_ << "}\n";
306  if (extra_newline_) {
307  be_global->impl_ << "\n";
308  }
309  }
bool extra_newline_
BE_GlobalData * be_global
Definition: be_global.cpp:44

Member Function Documentation

◆ addArg()

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

◆ endArgs()

void Function::endArgs ( )
inline

Member Data Documentation

◆ extra_newline_

bool Function::extra_newline_

Definition at line 264 of file dds_generator.h.

◆ has_arg_

bool Function::has_arg_

Definition at line 262 of file dds_generator.h.

◆ preamble_

std::string Function::preamble_

Definition at line 263 of file dds_generator.h.


The documentation for this struct was generated from the following file: