OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
dictionary.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef dictionr_h
36 #define dictionr_h
37 
38 #include "oofemcfg.h"
39 #include "pair.h"
40 #include "error.h"
41 #include "contextioresulttype.h"
42 #include "contextmode.h"
43 
44 #include <string>
45 #include <iosfwd>
46 
47 namespace oofem {
48 class DataStream;
49 
58 class OOFEM_EXPORT Dictionary
59 {
60 protected:
65 
66 public:
68  Dictionary() : first(NULL), last(NULL) { }
70  ~Dictionary();
71 
73  void clear();
80  Pair *add(int aKey, double value);
87  double &at(int aKey);
93  bool includes(int aKey);
95  void printYourself();
97  void formatAsString(std :: string &str);
99  int giveSize();
100 
106  contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
112  contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
113 
114  friend std :: ostream &operator << ( std :: ostream & out, const Dictionary & r );
115 };
116 } // end namespace oofem
117 #endif // dictionr_h
Pair * last
Last pair.
Definition: dictionary.h:64
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
std::ostream & operator<<(std::ostream &out, const Dictionary &r)
Definition: dictionary.C:253
This class implements a linked list whose entries are Pairs (see below).
Definition: dictionary.h:58
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
This class implements key/value associations - the key and its associated value.
Definition: pair.h:51
Pair * first
First pair.
Definition: dictionary.h:62
the oofem namespace is to define a context or scope in which all oofem names are defined.
Dictionary()
Constructor, creates empty dictionary.
Definition: dictionary.h:68

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011