hgl 0.5.25
A compiler/interpreter suite for developing images
Public Member Functions | Static Public Member Functions | List of all members
HGL::Common::PoptTableBuilder Class Reference

Builds a POPT table structure. More...

#include "popttablebuilder.h"

Public Member Functions

void addEntry (const std::string &name, struct::poptOption *opt)
 Adds an entry to the last added subtable. More...
 
void addSubtable (const std::string &desc)
 Adds a subtable (group) containing further POPT tables. More...
 
struct::poptOption & getPoptTable ()
 Builds a reference to a POPT option table to include. More...
 

Static Public Member Functions

static bool isTableEntry (const struct::poptOption &opt)
 Checks if a given POPT option is POPT_ARG_INCLUDE_TABLE and its arg is NULL. More...
 

Detailed Description

Builds a POPT table structure.

This class builds a POPT table structure for dynamic inclusion of POPT command line arguments.

Author
Heiko Schäfer heiko.nosp@m.@hgl.nosp@m..rang.nosp@m.un.d.nosp@m.e
Since
0.5.15

Member Function Documentation

void PoptTableBuilder::addEntry ( const std::string &  name,
struct::poptOption *  opt 
)

Adds an entry to the last added subtable.

Parameters
namefor the POPT option table
optPOPT option structure array
Since
0.5.15
void PoptTableBuilder::addSubtable ( const std::string &  desc)

Adds a subtable (group) containing further POPT tables.

Parameters
desca description for the group
Since
0.5.15
struct::poptOption & PoptTableBuilder::getPoptTable ( )

Builds a reference to a POPT option table to include.

Precondition
A table built by calls to addSubTable and addEntry
Returns
a reference to a POPT option table to include
Since
0.5.15
bool PoptTableBuilder::isTableEntry ( const struct::poptOption &  opt)
static

Checks if a given POPT option is POPT_ARG_INCLUDE_TABLE and its arg is NULL.

Parameters
opta POPT option
Returns
true if the given POPT option is POPT_ARG_INCLUDE_TABLE and its arg is NULL, false otherwise
Since
0.5.15