The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Public Attributes | List of all members
tfilter_description Struct Reference

Helper structure to describe what a filter does. More...

#include <filter.hpp>

Classes

struct  tparameter
 Describes a filter parameter. More...
 

Public Member Functions

 tfilter_description (const std::string &fmt)
 Constructor. More...
 

Public Attributes

std::string name
 Name of the filter. More...
 
std::string description
 Description of the filter. More...
 
std::vector< tparameterparameters
 The list of filter parameters. More...
 

Detailed Description

Helper structure to describe what a filter does.

This structure should make it easier to create help messages.

Definition at line 36 of file filter.hpp.

Constructor & Destructor Documentation

tfilter_description::tfilter_description ( const std::string fmt)
explicit

Constructor.

Creates an object from a specially formated string. The string contains of a number of fields seperated by a pipe-symbol. The number of fields should be 2 + 3 * params, where params is the number of parameters of the filter. The fields are:

Parameters
fmtThe format string as described above.

Definition at line 209 of file filter.cpp.

References description, i, and utils::split().

Member Data Documentation

std::string tfilter_description::description

Description of the filter.

Shortly describes what the filter does.

Definition at line 69 of file filter.hpp.

Referenced by operator<<(), and tfilter_description().

std::string tfilter_description::name

Name of the filter.

This is the ID parameter given on the command line.

Definition at line 62 of file filter.hpp.

Referenced by operator<<().

std::vector<tparameter> tfilter_description::parameters

The list of filter parameters.

Definition at line 85 of file filter.hpp.

Referenced by operator<<().


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