cwidget  0.5.17
Classes | Namespaces | Typedefs | Functions
column_definition.h File Reference

Support for parsing configuration strings that describe how to display columnar data. More...

#include <list>
#include <string>
#include <cwidget/generic/util/eassert.h>
#include <cwidget/columnify.h>

Go to the source code of this file.

Classes

struct  cwidget::config::column_type_defaults
 Defines the default settings for a particular column type. More...
 
class  cwidget::config::column_parameters
 Defines the string arguments passed into the layout process. More...
 
class  cwidget::config::empty_column_parameters
 An empty list of parameters. More...
 
struct  cwidget::config::column_definition
 Defines how a single column is to be generated. More...
 
class  cwidget::config::column_generator
 The class that defines how to parse and generate columns. More...
 

Namespaces

 cwidget
 The namespace containing everything defined by cwidget.
 
 cwidget::config
 Routines that support parsing and interpreting user configuration.
 

Typedefs

typedef std::list< column_definition > cwidget::config::column_definition_list
 The type used to store lists of column definitions. More...
 
typedef int(* cwidget::config::column_parser_func) (char id)
 The type of a function that parses a single-character column type flag and returns an integer identifying the column type.
 

Functions

column_definition_list * cwidget::config::parse_columns (std::wstring config, column_parser_func parser, column_type_defaults *defaults)
 Parse the given string into a list of column definitions. More...
 

Detailed Description

Support for parsing configuration strings that describe how to display columnar data.

This routine provides a general interface for parsing configuration data about a column format and later instantiating that information. The caller has to provide some information, in the form of tables and callbacks, that's used to do the actual formatting.

Column strings are printf-style; the caller determines how %-escapes are interpreted by mapping them to integer codes that identify column types (-1 is reserved for internal use).