Flow123d  jenkins-Flow123d-windows32-release-multijob-51
Classes | Macros
field_set.hh File Reference
#include <system/exceptions.hh>
#include "fields/field.hh"
#include "fields/field_flag.hh"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FieldSet
 Container for various descendants of FieldCommonBase. More...
 

Macros

#define ADD_FIELD(name,...)   this->add_field(&name, string(#name), __VA_ARGS__)
 

Macro Definition Documentation

#define ADD_FIELD (   name,
  ... 
)    this->add_field(&name, string(#name), __VA_ARGS__)

(OBSOLETE) Macro to simplify call of FieldSet::add_field method. Two forms are supported:

ADD_FIELD(some_field, description); ADD_FIELD(some_field, description, Default);

The first form adds name "some_field" to the field member some_field, also adds description of the field. No default value is specified, so the user must initialize the field on all regions (This is checked in the Field<..>::set_time method)

The second form adds also default value to the field, that is Default(".."), or Default::read_time(), other default value specifications are meaningless. The automatic conversion to FieldConst is used, e.g. Default::("0.0") is automatically converted to { TYPE="FieldConst", value=[ 0.0 ] } for a vector valued field, so you get zero vector on output on regions with default value.

Definition at line 260 of file field_set.hh.