Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

abacus::AbacusRoot Class Reference

Base class of all other classes of ABACUS. More...

#include <ogdf/lib/abacus/abacusroot.h>

+ Inheritance diagram for abacus::AbacusRoot:

Public Member Functions

virtual ~AbacusRoot ()
 The destructor. More...
 

Static Public Member Functions

static bool ascii2bool (const string &str)
 Converts the string str to a boolean value. More...
 
static bool endsWith (const string &str, const string &end)
 Returns true if str ends with end, false otherwise. More...
 
static double fracPart (double x)
 Returns the absolute value of the fractional part of x. More...
 
static const char * onOff (bool value)
 Converts a boolean variable to the strings "on" and "off". More...
 

Detailed Description

Base class of all other classes of ABACUS.

This class is the base class of all other classes of ABACUS. By embedding an enumeration and some useful functions in this class we can avoid a global scope of these names.

Definition at line 68 of file abacusroot.h.

Constructor & Destructor Documentation

◆ ~AbacusRoot()

virtual abacus::AbacusRoot::~AbacusRoot ( )
inlinevirtual

The destructor.

Is only implemented since it should be virtual in derived classes.

Definition at line 74 of file abacusroot.h.

Member Function Documentation

◆ ascii2bool()

static bool abacus::AbacusRoot::ascii2bool ( const string &  str)
static

Converts the string str to a boolean value.

This is only possible for the strings "true" and "false".

◆ endsWith()

static bool abacus::AbacusRoot::endsWith ( const string &  str,
const string &  end 
)
static

Returns true if str ends with end, false otherwise.

◆ fracPart()

static double abacus::AbacusRoot::fracPart ( double  x)
inlinestatic

Returns the absolute value of the fractional part of x.

E.g., it holds fracPart(2.33) == 0.33 and fracPart(-1.77) == 0.77.

Parameters
xThe value of which the fractional part is computed.

Definition at line 91 of file abacusroot.h.

◆ onOff()

static const char* abacus::AbacusRoot::onOff ( bool  value)
static

Converts a boolean variable to the strings "on" and "off".

Parameters
valueThe boolean variable being converted.
Returns
"on" if value is true
"off" otherwise

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