Aprepro 5.0x
Loading...
Searching...
No Matches
apr_symrec.h
Go to the documentation of this file.
1// Copyright(C) 1999-, 20212021, , , , , , , , National Technology & Engineering Solutions
2// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3// NTESS, the U.S. Government retains certain rights in this software.
4//
5// See packages/seacas/LICENSE for details
6
7// Might be good to add a callback function which would be called
8// when there was output -- In LexerOutput for example. Default
9// could be to just write to std::cout or to resultsOutput stringstream...
10#pragma once
11
12#include <string>
13#include <vector>
14
15namespace SEAMS {
16 struct array
17 {
18 std::vector<double> data{};
19 size_t rows{0};
20 size_t cols{0};
21
22 array(size_t r, size_t c) : rows(r), cols(c) { data.resize(r * c); }
23 };
24
25 struct symrec
26 {
27 std::string name{};
28 std::string syntax{};
29 std::string info{};
30 int type;
32 struct value
33 {
34 double var{0};
35 double (*fnctptr)(){nullptr};
36 double (*fnctptr_d)(double){nullptr};
37 double (*fnctptr_c)(char *){nullptr};
38 double (*fnctptr_dc)(double, char *){nullptr};
39 double (*fnctptr_cd)(char *, double){nullptr};
40 double (*fnctptr_cc)(char *, char *){nullptr};
41 double (*fnctptr_dd)(double, double){nullptr};
42 double (*fnctptr_ddd)(double, double, double){nullptr};
43 double (*fnctptr_ccc)(char *, char *, char *){nullptr};
44 double (*fnctptr_ccd)(char *, char *, double){nullptr};
45 double (*fnctptr_dddd)(double, double, double, double){nullptr};
46 double (*fnctptr_ddddc)(double, double, double, double, char *){nullptr};
47 double (*fnctptr_dddddd)(double, double, double, double, double, double){nullptr};
48 double (*fnctptr_a)(const array *){nullptr};
49 std::string svar{};
50 const char *(*strfnct)(){nullptr};
51 const char *(*strfnct_c)(char *){nullptr};
52 const char *(*strfnct_d)(double){nullptr};
53 const char *(*strfnct_a)(const array *){nullptr};
54 const char *(*strfnct_dd)(double, double){nullptr};
55 const char *(*strfnct_cc)(char *, char *){nullptr};
56 const char *(*strfnct_ccc)(char *, char *, char *){nullptr};
57 const char *(*strfnct_dc)(double, char *){nullptr};
58 const char *(*strfnct_dcc)(double, char *, char *){nullptr};
59 const char *(*strfnct_dcccc)(double, char *, char *, char *, char *){nullptr};
60 array *avar{nullptr}; /* Array Variable */
61 array *(*arrfnct_c)(const char *){nullptr};
62 array *(*arrfnct_cc)(const char *, const char *){nullptr};
63 array *(*arrfnct_cd)(const char *, double){nullptr};
64 array *(*arrfnct_ddd)(double, double, double){nullptr};
65 array *(*arrfnct_dd)(double, double){nullptr};
66 array *(*arrfnct_d)(double){nullptr};
67 array *(*arrfnct_a)(const array *){nullptr};
70
71 symrec(const char *my_name, int my_type, bool is_internal = false)
72 : name(my_name), syntax(my_name), info("UNDEFINED"), type(my_type), isInternal(is_internal),
73 next(nullptr)
74 {
75 value.var = 0;
76 }
77
78 symrec(const std::string &my_name, int my_type, bool is_internal = false)
79 : name(my_name), syntax(my_name), info("UNDEFINED"), type(my_type), isInternal(is_internal),
80 next(nullptr)
81 {
82 value.var = 0;
83 }
84 };
85} // namespace SEAMS
Definition apr_aprepro.cc:57
Definition apr_symrec.h:17
size_t rows
Definition apr_symrec.h:19
std::vector< double > data
Definition apr_symrec.h:18
array(size_t r, size_t c)
Definition apr_symrec.h:22
size_t cols
Definition apr_symrec.h:20
Definition apr_symrec.h:33
double(* fnctptr_ccc)(char *, char *, char *)
Definition apr_symrec.h:43
std::string svar
Definition apr_symrec.h:49
double(* fnctptr_ccd)(char *, char *, double)
Definition apr_symrec.h:44
double(* fnctptr_a)(const array *)
Definition apr_symrec.h:48
double(* fnctptr_cc)(char *, char *)
Definition apr_symrec.h:40
double(* fnctptr_dc)(double, char *)
Definition apr_symrec.h:38
array * avar
Definition apr_symrec.h:60
double var
Definition apr_symrec.h:34
double(* fnctptr_dddd)(double, double, double, double)
Definition apr_symrec.h:45
double(* fnctptr_cd)(char *, double)
Definition apr_symrec.h:39
double(* fnctptr_dddddd)(double, double, double, double, double, double)
Definition apr_symrec.h:47
double(* fnctptr_ddddc)(double, double, double, double, char *)
Definition apr_symrec.h:46
double(* fnctptr_dd)(double, double)
Definition apr_symrec.h:41
double(* fnctptr)()
Definition apr_symrec.h:35
double(* fnctptr_ddd)(double, double, double)
Definition apr_symrec.h:42
double(* fnctptr_d)(double)
Definition apr_symrec.h:36
double(* fnctptr_c)(char *)
Definition apr_symrec.h:37
Definition apr_symrec.h:26
std::string name
Definition apr_symrec.h:27
symrec * next
Definition apr_symrec.h:69
struct SEAMS::symrec::value value
bool isInternal
Definition apr_symrec.h:31
symrec(const char *my_name, int my_type, bool is_internal=false)
Definition apr_symrec.h:71
std::string syntax
Definition apr_symrec.h:28
int type
Definition apr_symrec.h:30
std::string info
Definition apr_symrec.h:29
symrec(const std::string &my_name, int my_type, bool is_internal=false)
Definition apr_symrec.h:78