60 for (
int i = 0; i < ntok; i++ ) {
71 for (
int i = 0; i < ntok; i++ ) {
83 for (
int i = 0; i < ntok; i++ ) {
93 this->
record = std :: move(newRec);
97 for (
int i = 0; i < ntok; i++ ) {
109 if ( ptr == NULL || *ptr != 0 ) {
139 if ( ptr == NULL || *ptr != 0 ) {
157 if ( ptr == NULL || *ptr != 0 ) {
176 if ( ptr == NULL || *ptr != 0 ) {
223 if ( ptr == NULL || *ptr != 0) {
230 for (
int i = 1; i <= size; i++ ) {
232 if ( ptr == NULL || *ptr != 0 ) {
236 answer.
at(i) = value;
255 if ( ptr == NULL || *ptr != 0 ) {
262 for (
int i = 1; i <= size; i++ ) {
264 if ( ptr == NULL || *ptr != 0 ) {
268 answer.
at(i) = value;
287 if ( ptr == NULL || *ptr != 0 ) {
293 if ( ptr == NULL || *ptr != 0 ) {
318 if ( ptr == NULL || *ptr != 0 ) {
321 answer.reserve(size);
323 for (
int i = 1; i <= size; i++ ) {
344 if ( ptr == NULL || *ptr != 0 ) {
351 for (
int i = 1; i <= size; i++ ) {
355 if ( ptr == NULL || *ptr != 0 ) {
360 answer.
add(key, value);
378 if ( * rec !=
'{' ) {
389 list.push_back(range);
393 while ( isspace(* rec) ) {
398 if ( * rec !=
'}' ) {
419 if ( * rec ==
'@' ) {
423 if ( ptr == NULL || *ptr != 0 ) {
428 }
else if ( * rec ==
'$' ) {
434 std :: string _v = expr.substr(1, expr.size() - 2);
440 if ( ptr == NULL || *ptr != 0 ) {
463 return ( indx > 0 ) ?
true :
false;
469 printf(
"%s", this->
record.c_str() );
480 if ( source == NULL ) {
485 value = strtol(source, & endptr, 10);
497 if ( source == NULL ) {
502 value = strtod(source, & endptr);
510 for (
int i = 1; i <= ntokens; i++ ) {
526 std :: ostringstream buff;
527 bool pf =
true, wf =
false;
529 for (
int i = 0; i < ntokens; i++ ) {
533 buff <<
"Unread token(s) detected in the following record\n\"";
534 for (
int j = 0; j < 40; j++ ) {
535 if ( this->
record [ j ] ==
'\n' || this->
record [ j ] ==
'\0' ) {
538 buff << this->
record [ j ];
541 if ( this->
record.size() > 41 ) {
564 while ( isspace(* * helpSource) ) {
569 if ( isdigit(* * helpSource) ) {
571 li = hi = strtol(* helpSource, & endptr, 10);
572 * helpSource = endptr;
574 }
else if ( * * helpSource ==
'(' ) {
578 li = strtol(* helpSource, & endptr, 10);
579 * helpSource = endptr;
581 if ( * * helpSource !=
' ' && * * helpSource !=
'\t' ) {
587 hi = strtol(* helpSource, & endptr, 10);
588 * helpSource = endptr;
590 while ( isspace(* * helpSource) ) {
595 if ( * * helpSource ==
')' ) {
610 const char *endptr = helpSource;
612 if ( helpSource == NULL ) {
619 while ( isspace(* endptr) ) {
623 if ( * endptr ==
'{' ) {
627 for (
int i = 1; i <= r; i++ ) {
628 for (
int j = 1; j <= c; j++ ) {
634 while ( isspace(* endptr) ) {
639 if ( * endptr ==
';' ) {
649 while ( isspace(* endptr) ) {
654 if ( * endptr ==
'}' ) {
672 "Input error on line %d: \"%s\", field keyword \"%s\"\nIn function %s::%s\nRecord:\"%s\"",
double & at(int i)
Coefficient access function.
const char * InputFieldType
Identifier of fields in input records.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
void setValue(double val)
Sets receiver to be a constant scalar function defined by given value.
void writeELogMsg(logLevelType level, const char *_func, const char *_file, int _line, const char *format,...)
Writes extended log message with file and line info.
void setReference(int val)
Sets receiver to be a scalar function defined using external function.
const char * giveToken(int i)
Returns pointer to i-th token.
Class Range is an abstraction for interval of integer numbers.
void setSimpleExpression(std::string &val)
Sets receiver to be a scalar funtion defined by given simple expression.
void tokenizeLine(const std::string &line)
Tokenizes given record (string).
void clear()
Clears the receiver.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
Logger oofem_logger(Logger::LOG_LEVEL_INFO)
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
This class implements a linked list whose entries are Pairs (see below).
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
Implementation of Scalar function.
#define OOFEM_EXIT(code)
Cause oofem program termination by calling exit.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
#define OOFEM_WARNING(...)
int giveNumberOfTokens()
returns the number of tokens.
void resize(int s)
Resizes receiver towards requested size.