Rheolef  7.2
an efficient C++ finite element environment
space_constitution_get.cc
Go to the documentation of this file.
1 // input space_constitution files:
22 // idiststream& operator >> (idiststream&, space_constitution&);
23 //
24 // author: Pierre.Saramito@imag.fr
25 //
26 // date: 19 dec 2011
27 //
29 
30 // ================================================================================
31 // part 1 : read from idiststeam and build as tree_type* result_ptr
32 // ================================================================================
33 /* AIX requires this to be the first thing in the file. */
34 #ifndef __GNUC__
35 # if _RHEOLEF_HAVE_ALLOCA_H
36 # include <alloca.h>
37 # else
38 # ifdef _AIX
39 #pragma alloca
40 # else
41 # ifndef alloca /* predefined by HP cc +Olibcalls */
42 char *alloca ();
43 # endif
44 # endif
45 # endif
46 #endif
47 
48 namespace rheolef {
49 
50 using namespace std;
51 
52 typedef size_t size_type;
53 
56 
57 extern int space_constitution_lex();
58 void space_constitution_error (const char* msg) {
59  std::string near;
60  error_macro("space constitution input:" << space_constitution_line_no << ": " << msg);
62 }
63 int space_constitution_wrap () { return 1; }
64 
65 #pragma GCC diagnostic push
66 #pragma GCC diagnostic ignored "-Weffc++"
67 #define YYMALLOC ::malloc
68 #define YYFREE ::free
69 #include "space_constitution_yacc.cc"
70 // avoid re-definition of YY_NULL within flex
71 #ifdef YY_NULL
72 #undef YY_NULL
73 #endif
74 #include "space_constitution_lex.cc"
75 #pragma GCC diagnostic pop
76 
77 static yyFlexLexer input_space_constitution;
78 
80 
81 // ================================================================================
82 // part 2 : main call
83 // ================================================================================
84 template<class T, class M>
85 idiststream&
87 {
88  space_constitution_get_pass_1_2 (ids, space_constitution_parse,
90  // convert tree_type result_ptr to space_constitution
91  const tree_type* ptr = result_ptr;
92  constit = build_from_tree<T,M> (*ptr);
93  delete_macro (result_ptr); result_ptr = 0;
94  return ids;
95 }
96 // ----------------------------------------------------------------------------
97 // instanciation in library
98 // ----------------------------------------------------------------------------
100 
101 #ifdef _RHEOLEF_HAVE_MPI
103 #endif // _RHEOLEF_HAVE_MPI
104 
105 } // namespace rheolef
idiststream: see the diststream page for the full documentation
Definition: diststream.h:336
static size_type space_constitution_n_error
static size_type space_constitution_line_no
static tree_type * result_ptr
static yyFlexLexer input_space_constitution
#define error_macro(message)
Definition: dis_macros.h:49
This file is part of Rheolef.
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition: catchmark.h:88
void space_constitution_error(const char *msg)
int space_constitution_lex()
int space_constitution_wrap()