OpenDDS  Snapshot(2023/04/28-20:55)
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 312 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 314 of file dds_generator.h.

318  : what_(what)
319  , impl_(impl)
320  , header_(header)
321  , indent_(indent)
322  , extra_newline_(true)
323  {
324  output("#" + indent + "if" + what + "\n");
325  }
void output(const std::string &str) const
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 what_
const std::string indent_

◆ ~PreprocessorIfGuard()

PreprocessorIfGuard::~PreprocessorIfGuard ( )
inline

Definition at line 327 of file dds_generator.h.

328  {
329  output("#" + indent_ + "endif // if" + what_ + "\n");
330  if (extra_newline_) {
331  output("\n");
332  }
333  }
void output(const std::string &str) const
const std::string what_
const std::string indent_

Member Function Documentation

◆ extra_newline()

void PreprocessorIfGuard::extra_newline ( bool  value)
inline

Definition at line 345 of file dds_generator.h.

References value.

346  {
348  }
const LogLevel::Value value
Definition: debug.cpp:61

◆ output()

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

Definition at line 335 of file dds_generator.h.

References be_global.

336  {
337  if (impl_) {
338  be_global->impl_ << str;
339  }
340  if (header_) {
341  be_global->header_ << str;
342  }
343  }
BE_GlobalData * be_global
Definition: be_global.cpp:44

Member Data Documentation

◆ extra_newline_

bool PreprocessorIfGuard::extra_newline_
private

Definition at line 355 of file dds_generator.h.

◆ header_

const bool PreprocessorIfGuard::header_
private

Definition at line 353 of file dds_generator.h.

◆ impl_

const bool PreprocessorIfGuard::impl_
private

Definition at line 352 of file dds_generator.h.

◆ indent_

const std::string PreprocessorIfGuard::indent_
private

Definition at line 354 of file dds_generator.h.

◆ what_

const std::string PreprocessorIfGuard::what_
private

Definition at line 351 of file dds_generator.h.


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