OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Attributes | List of all members
PreprocessorIfGuard Class Reference

#include <dds_generator.h>

Collaboration diagram for PreprocessorIfGuard:
Collaboration graph
[legend]

Public Member Functions

 PreprocessorIfGuard (const std::string &what, bool impl=true, bool header=true, const std::string &indent="")
 
 ~PreprocessorIfGuard ()
 
void output (const std::string &str) const
 
void extra_newline (bool value)
 

Private Attributes

const std::string what_
 
const bool impl_
 
const bool header_
 
const std::string indent_
 
bool extra_newline_
 

Detailed Description

Definition at line 294 of file dds_generator.h.

Constructor & Destructor Documentation

◆ PreprocessorIfGuard()

PreprocessorIfGuard::PreprocessorIfGuard ( const std::string &  what,
bool  impl = true,
bool  header = true,
const std::string &  indent = "" 
)
inline

Definition at line 296 of file dds_generator.h.

300  : what_(what)
301  , impl_(impl)
302  , header_(header)
303  , indent_(indent)
304  , extra_newline_(false)
305  {
306  output("#" + indent + "if" + what + "\n");
307  }
const std::string what_
Christopher Diggins *renamed files *fixing compilation errors *adding Visual C project file *removed make Max Lybbert *removed references to missing and unused header
Definition: CHANGELOG.txt:8
const std::string indent_
void output(const std::string &str) const

◆ ~PreprocessorIfGuard()

PreprocessorIfGuard::~PreprocessorIfGuard ( )
inline

Definition at line 309 of file dds_generator.h.

310  {
311  output("#" + indent_ + "endif // if" + what_ + "\n");
312  if (extra_newline_) {
313  output("\n");
314  }
315  }
const std::string what_
const std::string indent_
void output(const std::string &str) const

Member Function Documentation

◆ extra_newline()

void PreprocessorIfGuard::extra_newline ( bool  value)
inline

Definition at line 327 of file dds_generator.h.

References value.

328  {
330  }
const LogLevel::Value value
Definition: debug.cpp:61

◆ output()

void PreprocessorIfGuard::output ( const std::string &  str) const
inline

Definition at line 317 of file dds_generator.h.

References be_global.

318  {
319  if (impl_) {
320  be_global->impl_ << str;
321  }
322  if (header_) {
323  be_global->header_ << str;
324  }
325  }
BE_GlobalData * be_global
Definition: be_global.cpp:43

Member Data Documentation

◆ extra_newline_

bool PreprocessorIfGuard::extra_newline_
private

Definition at line 337 of file dds_generator.h.

◆ header_

const bool PreprocessorIfGuard::header_
private

Definition at line 335 of file dds_generator.h.

◆ impl_

const bool PreprocessorIfGuard::impl_
private

Definition at line 334 of file dds_generator.h.

◆ indent_

const std::string PreprocessorIfGuard::indent_
private

Definition at line 336 of file dds_generator.h.

◆ what_

const std::string PreprocessorIfGuard::what_
private

Definition at line 333 of file dds_generator.h.


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