Flow123d  release_2.2.0-914-gf1a3a4f
Public Types | Public Member Functions | Public Attributes | List of all members
Input::Type::Record::RecordData Class Reference

Internal data class. More...

#include <type_record.hh>

Collaboration diagram for Input::Type::Record::RecordData:
Collaboration graph
[legend]

Public Types

typedef std::map< KeyHash, unsigned int >::const_iterator key_to_index_const_iter
 Container-like access to the database of valid keys. More...
 

Public Member Functions

 RecordData (const string &type_name_in, const string &description)
 Constructor. More...
 
void declare_key (const string &key, std::shared_ptr< TypeBase > type, const Default &default_value, const string &description, TypeBase::attribute_map key_attributes)
 Declares a key and stores its type. More...
 
Record::KeyIter auto_conversion_key_iter () const
 Returns iterator to auto-conversion key. More...
 
void content_hash (TypeBase::TypeHash &seed) const
 Count hash of RecordData. More...
 

Public Attributes

std::map< KeyHash, unsigned int > key_to_index
 Database of valid keys. More...
 
std::vector< struct Keykeys
 Keys in order as they where declared. More...
 
const string description_
 Description of the whole record type. More...
 
const string type_name_
 Name of the whole record type. More...
 
std::vector< std::shared_ptr< Abstract > > parent_vec_
 Permanent pointer to parent Abstract, necessary for output. More...
 
FinishStatus finish_status_
 Record is finished when it is correctly derived (optional) and have correct shared pointers to types in all keys. More...
 
bool closed_
 If record is closed, we do not allow any further declare_key calls. More...
 
bool derived_
 True for derived records after make_derived. More...
 
int auto_conversion_key_idx
 Index of auto convertible key. More...
 
std::string auto_conversion_key
 Name of key to use for auto conversion. More...
 

Detailed Description

Internal data class.

Stores data of the Record.

Definition at line 463 of file type_record.hh.

Member Typedef Documentation

Container-like access to the database of valid keys.

Definition at line 491 of file type_record.hh.

Constructor & Destructor Documentation

Input::Type::Record::RecordData::RecordData ( const string &  type_name_in,
const string &  description 
)

Constructor.

Definition at line 430 of file type_record.cc.

Member Function Documentation

Record::KeyIter Input::Type::Record::RecordData::auto_conversion_key_iter ( ) const

Returns iterator to auto-conversion key.

Definition at line 442 of file type_record.cc.

void Input::Type::Record::RecordData::content_hash ( TypeBase::TypeHash seed) const

Count hash of RecordData.

Definition at line 475 of file type_record.cc.

void Input::Type::Record::RecordData::declare_key ( const string &  key,
std::shared_ptr< TypeBase type,
const Default default_value,
const string &  description,
TypeBase::attribute_map  key_attributes 
)

Declares a key and stores its type.

The type parameter has to be finished at the call of declare_key(). If the parameter type_temporary is NULL, the parameter type provides pointer to already finished type that will be assigned to the key. On the other hand, if type_temporary is not NULL, only this raw pointer is stored and key is fully completed later through TypeBase::lazy_finish().

Definition at line 449 of file type_record.cc.

Here is the caller graph for this function:

Member Data Documentation

std::string Input::Type::Record::RecordData::auto_conversion_key

Name of key to use for auto conversion.

Definition at line 522 of file type_record.hh.

int Input::Type::Record::RecordData::auto_conversion_key_idx

Index of auto convertible key.

Initial value is = -1, when allow_auto_conversion is called we set this to 0. Final value can be assigned just after possible inheritance copy of keys from parent Abstract.

Definition at line 519 of file type_record.hh.

bool Input::Type::Record::RecordData::closed_

If record is closed, we do not allow any further declare_key calls.

Definition at line 508 of file type_record.hh.

bool Input::Type::Record::RecordData::derived_

True for derived records after make_derived.

Definition at line 511 of file type_record.hh.

const string Input::Type::Record::RecordData::description_

Description of the whole record type.

Definition at line 497 of file type_record.hh.

FinishStatus Input::Type::Record::RecordData::finish_status_

Record is finished when it is correctly derived (optional) and have correct shared pointers to types in all keys.

Definition at line 505 of file type_record.hh.

std::map<KeyHash, unsigned int> Input::Type::Record::RecordData::key_to_index

Database of valid keys.

Definition at line 489 of file type_record.hh.

std::vector<struct Key> Input::Type::Record::RecordData::keys

Keys in order as they where declared.

Definition at line 494 of file type_record.hh.

std::vector< std::shared_ptr<Abstract> > Input::Type::Record::RecordData::parent_vec_

Permanent pointer to parent Abstract, necessary for output.

Definition at line 502 of file type_record.hh.

const string Input::Type::Record::RecordData::type_name_

Name of the whole record type.

Definition at line 499 of file type_record.hh.


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