senf::term::Terminfo Class Reference
[Terminfo]

Terminfo database entry. More...

#include <senf/Utils/Termlib/Terminfo.hh>

List of all members.


Detailed Description

Terminfo database entry.

This class reads a single terminfo database entry and allows to access the terminfo properties.

Definition at line 65 of file Terminfo.hh.


Classes

struct   InvalidTerminfoException
  Invalid, incomplete or non-existent terminfo entry exception. More...
struct   properties
  Terminfo property constants. More...

Public Types

enum   { NoValue = -1 }
  NoValue constant This value represents the absence of a numeric property value. More...
typedef boost::int16_t  number_t
  Numeric terminfo property type.
typedef char const *  string_t
  String terminfo property type.

Public Member Functions

  Terminfo ()
  Terminfo (std::string const &term)
  Load terminfo entry term.
void  load (std::string const &term)
  Load terminfo entry term.
bool  getFlag (properties::Boolean p) const
  Get boolean property value.
number_t  getNumber (properties::Numeric p) const
  Get numeric property value.
string_t  getString (properties::String p) const
  Get string property value.
bool  hasProperty (properties::Boolean p) const
  true, if boolean property p exists
bool  hasProperty (properties::Numeric p) const
  true, if numeric property p exists
bool  hasProperty (properties::String p) const
  true, if string property p exists
std::string  formatString (properties::String p, number_t arg1=NoValue, number_t arg2=NoValue, number_t arg3=NoValue, number_t arg4=NoValue, number_t arg5=NoValue, number_t arg6=NoValue, number_t arg7=NoValue, number_t arg8=NoValue, number_t arg9=NoValue) const
  Format string property value.
void  dump (std::ostream &os) const
  Dump a description of the terminfo entry.

Member Typedef Documentation

typedef boost::int16_t senf::term::Terminfo::
number_t

Numeric terminfo property type.

Definition at line 184 of file Terminfo.hh.

typedef char const* senf::term::Terminfo::
string_t

String terminfo property type.

Definition at line 185 of file Terminfo.hh.


Member Enumeration Documentation

anonymous
enum

NoValue constant This value represents the absence of a numeric property value.

Enumerator:
NoValue 

Definition at line 73 of file Terminfo.hh.


Constructor & Destructor Documentation

senf::term::Terminfo::
Terminfo ()

Definition at line 132 of file Terminfo.cc.

senf::term::Terminfo::
Terminfo ( std::string const &  term )

Load terminfo entry term.

Definition at line 135 of file Terminfo.cc.


Member Function Documentation

void senf::term::Terminfo::
dump ( std::ostream &  os )

Dump a description of the terminfo entry.

Definition at line 316 of file Terminfo.cc.

std::string senf::term::Terminfo::
formatString ( properties::String  p,
number_t  arg1 = NoValue,
number_t  arg2 = NoValue,
number_t  arg3 = NoValue,
number_t  arg4 = NoValue,
number_t  arg5 = NoValue,
number_t  arg6 = NoValue,
number_t  arg7 = NoValue,
number_t  arg8 = NoValue,
number_t  arg9 = NoValue )

Format string property value.

Formats the string property p containing special terminfo codes. Terminfo supports up to 9 parameters.

Definition at line 225 of file Terminfo.cc.

bool senf::term::Terminfo::
getFlag ( properties::Boolean  p )

Get boolean property value.

Definition at line 149 of file Terminfo.cc.

senf::term::Terminfo::number_t senf::term::Terminfo::
getNumber ( properties::Numeric  p )

Get numeric property value.

Definition at line 157 of file Terminfo.cc.

senf::term::Terminfo::string_t senf::term::Terminfo::
getString ( properties::String  p )

Get string property value.

If the property does not exist, 0 is returned

Definition at line 165 of file Terminfo.cc.

bool senf::term::Terminfo::
hasProperty ( properties::String  p )

true, if string property p exists

Definition at line 185 of file Terminfo.cc.

bool senf::term::Terminfo::
hasProperty ( properties::Numeric  p )

true, if numeric property p exists

Definition at line 179 of file Terminfo.cc.

bool senf::term::Terminfo::
hasProperty ( properties::Boolean  p )

true, if boolean property p exists

Definition at line 173 of file Terminfo.cc.

void senf::term::Terminfo::
load ( std::string const &  term )

Load terminfo entry term.

Definition at line 140 of file Terminfo.cc.


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