Go to the documentation of this file.
45Dictionary :: ~Dictionary()
57 Next =
first->giveNext();
67Dictionary :: giveSize()
79Pair *Dictionary :: add(
int k,
double v)
92 last->append(newPair);
103double &Dictionary :: at(
int aKey)
109 if ( next->
giveKey() == aKey ) {
116 Pair *newPair = this->
add(aKey, 0);
121double Dictionary :: at(
int aKey)
const
125 if ( next->
giveKey() == aKey ) {
131 OOFEM_ERROR(
"Requested key missing from dictionary");
135bool Dictionary :: includes(
int aKey)
const
141 if ( next->
giveKey() == aKey ) {
152void Dictionary :: printYourself()
157 printf(
"Dictionary : \n");
168Dictionary :: formatAsString(std :: string &str)
196 if ( !stream.
write(nitems) ) {
205 if ( !stream.
write(key) ) {
209 if ( !stream.
write(value) ) {
228 if ( !stream.
read(size) ) {
233 for (
int i = 1; i <= size; i++ ) {
234 if ( !stream.
read(key) ) {
238 if ( !stream.
read(value) ) {
242 this->
at(key) = value;
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
Dictionary()
Constructor, creates empty dictionary.
void clear()
Clears the receiver.
bool includes(int aKey) const
Pair * add(int aKey, double value)
Pair * giveNext()
Returns pointer to the next pair.
int giveKey()
Returns the receiver key.
double & giveValue()
Returns associated value.
void printYourself()
Prints receiver to screen.
std::ostream & operator<<(std ::ostream &out, const Dictionary &r)
@ CIO_IOERR
General IO error.
This page is part of the
OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at for OOFEM by
doxygen
1.15.0 written by Dimitri van Heesch,
© 1997-2011