equal
deleted
inserted
replaced
57 * is therefore a singleton. |
57 * is therefore a singleton. |
58 */ |
58 */ |
59 |
59 |
60 class type_initial_value_c : public null_visitor_c { |
60 class type_initial_value_c : public null_visitor_c { |
61 |
61 |
|
62 public: |
|
63 static symbol_c *get(symbol_c *type); |
|
64 |
62 private: |
65 private: |
63 static type_initial_value_c *_instance; |
|
64 /* constants for the default values of elementary data types... */ |
66 /* constants for the default values of elementary data types... */ |
65 static real_c *real_0; |
67 static real_c *real_0; |
66 static integer_c *integer_0, *integer_1; |
68 static integer_c *integer_0, *integer_1; |
67 static boolean_literal_c *bool_0; |
69 static boolean_literal_c *bool_0; |
68 static date_literal_c *date_literal_0; |
70 static date_literal_c *date_literal_0; |
72 static time_of_day_c *tod_0; |
74 static time_of_day_c *tod_0; |
73 static date_and_time_c *dt_0; |
75 static date_and_time_c *dt_0; |
74 static single_byte_character_string_c *string_0; |
76 static single_byte_character_string_c *string_0; |
75 static double_byte_character_string_c *wstring_0; |
77 static double_byte_character_string_c *wstring_0; |
76 |
78 |
77 public: |
|
78 static type_initial_value_c *instance(void); |
|
79 |
|
80 protected: |
79 protected: |
81 type_initial_value_c(void); |
80 type_initial_value_c(void); |
82 |
81 |
83 public: |
|
84 symbol_c *get(identifier_c *type_name); |
|
85 |
|
86 |
|
87 private: |
82 private: |
|
83 static type_initial_value_c *_instance; |
|
84 static type_initial_value_c *instance(void); |
88 void *handle_type_spec(symbol_c *base_type_name, symbol_c *type_spec_init); |
85 void *handle_type_spec(symbol_c *base_type_name, symbol_c *type_spec_init); |
89 |
86 |
90 private: |
87 private: |
91 void *visit(identifier_c *type_name); |
88 void *visit(identifier_c *type_name); |
92 |
89 |