Public Member Functions | Private Attributes
demandDrivenEntry< Type > Class Template Reference

Class for demand-driven dictionary entries. More...

Inheritance diagram for demandDrivenEntry< Type >:
Inheritance graph
[legend]
Collaboration diagram for demandDrivenEntry< Type >:
Collaboration graph
[legend]

Public Member Functions

 demandDrivenEntry (const dictionary &dict, const Type &value)
 Constructors. More...
 
 demandDrivenEntry (const dictionary &dict, const word &keyword)
 Construct from dictionary and keyword. More...
 
 demandDrivenEntry (const dictionary &dict, const word &keyword, const Type &defaultValue, const bool readIfPresent=true)
 Construct from dictionary, keyword and default value. More...
 
 demandDrivenEntry (const demandDrivenEntry &dde)
 Copy constructor. More...
 
void initialise () const
 Initialise. More...
 
const Type & value () const
 Return the value. More...
 
void setValue (const Type &value)
 Set the value. More...
 
void reset ()
 Reset the demand-driven entry. More...
 

Private Attributes

const dictionarydict_
 Reference to the dictionary. More...
 
const word keyword_
 Keyword to look up. More...
 
Type value_
 Value. More...
 
bool stored_
 Flag to say that the value has been stored. More...
 

Detailed Description

template<class Type>
class Foam::demandDrivenEntry< Type >

Class for demand-driven dictionary entries.

Holds a reference to a dictionary, which is then queried if the value is requested and has not already been cached

Source files

Definition at line 53 of file demandDrivenEntry.H.

Constructor & Destructor Documentation

◆ demandDrivenEntry() [1/4]

demandDrivenEntry ( const dictionary dict,
const Type &  value 
)

Constructors.

Construct from dictionary and value - cannot be re-read

Definition at line 32 of file demandDrivenEntry.C.

◆ demandDrivenEntry() [2/4]

demandDrivenEntry ( const dictionary dict,
const word keyword 
)

Construct from dictionary and keyword.

Definition at line 46 of file demandDrivenEntry.C.

◆ demandDrivenEntry() [3/4]

demandDrivenEntry ( const dictionary dict,
const word keyword,
const Type &  defaultValue,
const bool  readIfPresent = true 
)

Construct from dictionary, keyword and default value.

Definition at line 60 of file demandDrivenEntry.C.

◆ demandDrivenEntry() [4/4]

demandDrivenEntry ( const demandDrivenEntry< Type > &  dde)

Copy constructor.

Definition at line 80 of file demandDrivenEntry.C.

Member Function Documentation

◆ initialise()

void initialise
inline

Initialise.

Definition at line 31 of file demandDrivenEntryI.H.

◆ value()

const Type & value
inline

Return the value.

Definition at line 42 of file demandDrivenEntryI.H.

◆ setValue()

void setValue ( const Type &  value)
inline

Set the value.

Definition at line 51 of file demandDrivenEntryI.H.

◆ reset()

void reset
inline

Reset the demand-driven entry.

Definition at line 60 of file demandDrivenEntryI.H.

Field Documentation

◆ dict_

const dictionary& dict_
private

Reference to the dictionary.

Definition at line 60 of file demandDrivenEntry.H.

◆ keyword_

const word keyword_
private

Keyword to look up.

Definition at line 63 of file demandDrivenEntry.H.

◆ value_

Type value_
mutableprivate

Value.

Definition at line 66 of file demandDrivenEntry.H.

◆ stored_

bool stored_
mutableprivate

Flag to say that the value has been stored.

Definition at line 69 of file demandDrivenEntry.H.


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