OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
inputrecord.C
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 #include "inputrecord.h"
36 
37 namespace oofem {
39 
41 
44 {
45  return * this;
46 }
47 
48 const char *
50 {
51  switch ( rt ) {
52  case IRRT_NOTFOUND:
53  return "Missing Keyword"; // string literal is statically allocated, return safe
54 
55  case IRRT_BAD_FORMAT:
56  return "Bad format";
57 
58  default:
59  return "Unknown error";
60  }
61 }
62 
65 {
66  IRResultType r = this->giveField(answer, id);
67  if ( r == IRRT_NOTFOUND ) {
68  return IRRT_OK;
69  } else {
70  return r;
71  }
72 }
73 
76 {
77  IRResultType r = this->giveField(answer, id);
78  if ( r == IRRT_NOTFOUND ) {
79  return IRRT_OK;
80  } else {
81  return r;
82  }
83 }
84 
87 {
88  IRResultType r = this->giveField(answer, id);
89  if ( r == IRRT_NOTFOUND ) {
90  return IRRT_OK;
91  } else {
92  return r;
93  }
94 }
95 
98 {
99  IRResultType r = this->giveField(answer, id);
100  if ( r == IRRT_NOTFOUND ) {
101  return IRRT_OK;
102  } else {
103  return r;
104  }
105 }
106 
109 {
110  IRResultType r = this->giveField(answer, id);
111  if ( r == IRRT_NOTFOUND ) {
112  return IRRT_OK;
113  } else {
114  return r;
115  }
116 }
117 
120 {
121  IRResultType r = this->giveField(answer, id);
122  if ( r == IRRT_NOTFOUND ) {
123  return IRRT_OK;
124  } else {
125  return r;
126  }
127 }
128 
131 {
132  IRResultType r = this->giveField(answer, id);
133  if ( r == IRRT_NOTFOUND ) {
134  return IRRT_OK;
135  } else {
136  return r;
137  }
138 }
139 
141 InputRecord :: giveOptionalField(std :: vector< std :: string > &answer, InputFieldType id)
142 {
143  IRResultType r = this->giveField(answer, id);
144  if ( r == IRRT_NOTFOUND ) {
145  return IRRT_OK;
146  } else {
147  return r;
148  }
149 }
150 
153 {
154  IRResultType r = this->giveField(answer, id);
155  if ( r == IRRT_NOTFOUND ) {
156  return IRRT_OK;
157  } else {
158  return r;
159  }
160 }
161 
163 InputRecord :: giveOptionalField(std :: list< Range > &answer, InputFieldType id)
164 {
165  IRResultType r = this->giveField(answer, id);
166  if ( r == IRRT_NOTFOUND ) {
167  return IRRT_OK;
168  } else {
169  return r;
170  }
171 }
172 
175 {
176  IRResultType r = this->giveField(answer, id);
177  if ( r == IRRT_NOTFOUND ) {
178  return IRRT_OK;
179  } else {
180  return r;
181  }
182 }
183 } // end namespace oofem
InputRecord()
Constructor. Creates an empty input record.
Definition: inputrecord.C:38
const char * strerror(IRResultType)
Returns error string corresponding to given value of IRResultType type.
Definition: inputrecord.C:49
virtual IRResultType giveField(int &answer, InputFieldType id)=0
Reads the integer field value.
const char * InputFieldType
Identifier of fields in input records.
Definition: inputrecord.h:52
Class implementing an array of integers.
Definition: intarray.h:61
InputRecord & operator=(const InputRecord &)
Assignment operator.
Definition: inputrecord.C:43
This class implements a linked list whose entries are Pairs (see below).
Definition: dictionary.h:58
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Implementation of Scalar function.
Class representing the general Input Record.
Definition: inputrecord.h:101
the oofem namespace is to define a context or scope in which all oofem names are defined.
IRResultType giveOptionalField(int &answer, InputFieldType id)
Reads the integer field value.
Definition: inputrecord.C:64

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:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011