CUBRID Engine
latest
|
#include <load_semantic_helper.hpp>
Public Member Functions | |
semantic_helper () | |
semantic_helper (const semantic_helper ©)=delete | |
semantic_helper & | operator= (const semantic_helper &other)=delete |
~semantic_helper () | |
void | append_char (char c) |
string_type * | append_string_list (string_type *head, string_type *tail) |
constant_type * | append_constant_list (constant_type *head, constant_type *tail) |
void | set_quoted_string_buffer () |
string_type * | make_string_by_buffer () |
string_type * | make_string_by_yytext (const char *text, int text_size) |
constant_type * | make_constant (int type, void *val) |
constant_type * | make_real (string_type *str) |
constant_type * | make_monetary_constant (int currency_type, string_type *amount) |
void | reset_after_line () |
void | reset_after_batch () |
bool | in_instance_line () |
void | set_in_instance_line (bool in_instance_line) |
Private Member Functions | |
string_type * | make_string (char *val, std::size_t size, bool need_free_val) |
string_type * | make_string_and_copy (const char *src, size_t str_size) |
void | extend_quoted_string_buffer (size_t new_size) |
bool | is_utf8_valid (string_type *str) |
bool | use_copy_buf_pool (std::size_t str_size) |
void | clear () |
template<typename T > | |
T * | append_list (T *head, T *tail) |
Private Attributes | |
bool | m_in_instance_line |
std::size_t | m_string_pool_idx |
string_type | m_string_pool [STRING_POOL_SIZE] |
std::forward_list< string_type * > | m_string_list |
std::size_t | m_copy_buf_pool_idx |
char | m_copy_buf_pool [COPY_BUF_POOL_SIZE][MAX_COPY_BUF_SIZE] |
std::size_t | m_constant_pool_idx |
constant_type | m_constant_pool [CONSTANT_POOL_SIZE] |
std::forward_list< constant_type * > | m_constant_list |
bool | m_use_qstr_buf |
cubmem::extensible_block | m_qstr_buf |
char * | m_qstr_buf_ptr |
std::size_t | m_qstr_buf_idx |
char | m_qstr_buf_pool [QUOTED_STR_BUF_POOL_SIZE][MAX_QUOTED_STR_BUF_SIZE] |
std::size_t | m_qstr_buf_pool_idx |
Definition at line 62 of file load_semantic_helper.hpp.
cubload::semantic_helper::semantic_helper | ( | ) |
Definition at line 34 of file load_semantic_helper.cpp.
References cubmem::EXPONENTIAL_STANDARD_BLOCK_ALLOCATOR, m_constant_list, m_constant_pool, m_constant_pool_idx, m_copy_buf_pool, m_copy_buf_pool_idx, m_qstr_buf, m_qstr_buf_idx, m_qstr_buf_pool, m_qstr_buf_pool_idx, m_qstr_buf_ptr, m_string_list, m_use_qstr_buf, and NULL.
|
delete |
cubload::semantic_helper::~semantic_helper | ( | ) |
Definition at line 54 of file load_semantic_helper.cpp.
References clear().
void cubload::semantic_helper::append_char | ( | char | c | ) |
Definition at line 60 of file load_semantic_helper.cpp.
References extend_quoted_string_buffer(), m_qstr_buf_idx, m_qstr_buf_pool_idx, m_qstr_buf_ptr, m_use_qstr_buf, and cubload::MAX_QUOTED_STR_BUF_SIZE.
constant_type * cubload::semantic_helper::append_constant_list | ( | constant_type * | head, |
constant_type * | tail | ||
) |
Definition at line 92 of file load_semantic_helper.cpp.
|
private |
Definition at line 332 of file load_semantic_helper.cpp.
References NULL.
string_type * cubload::semantic_helper::append_string_list | ( | string_type * | head, |
string_type * | tail | ||
) |
Definition at line 86 of file load_semantic_helper.cpp.
|
private |
Definition at line 308 of file load_semantic_helper.cpp.
References cubload::string_type::destroy(), i, m_constant_list, m_string_list, m_string_pool, m_string_pool_idx, min, and cubload::STRING_POOL_SIZE.
Referenced by reset_after_line(), and ~semantic_helper().
|
private |
Definition at line 280 of file load_semantic_helper.cpp.
References cubmem::extensible_block::extend_to(), cubmem::extensible_block::get_ptr(), m_qstr_buf, and m_qstr_buf_ptr.
Referenced by append_char(), and set_quoted_string_buffer().
bool cubload::semantic_helper::in_instance_line | ( | ) |
Definition at line 213 of file load_semantic_helper.cpp.
References m_in_instance_line.
Referenced by set_in_instance_line().
|
private |
Definition at line 288 of file load_semantic_helper.cpp.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_INVALID_CHAR, er_set(), intl_check_string(), INTL_UTF8_VALID, LANG_SYS_CODESET, NULL, cubload::string_type::size, and cubload::string_type::val.
Referenced by make_string_by_buffer(), and make_string_by_yytext().
constant_type * cubload::semantic_helper::make_constant | ( | int | type, |
void * | val | ||
) |
Definition at line 152 of file load_semantic_helper.cpp.
References cubload::CONSTANT_POOL_SIZE, m_constant_list, m_constant_pool, m_constant_pool_idx, NULL, cubload::constant_type::type, and cubload::constant_type::val.
Referenced by make_monetary_constant(), and make_real().
constant_type * cubload::semantic_helper::make_monetary_constant | ( | int | currency_type, |
string_type * | amount | ||
) |
Definition at line 196 of file load_semantic_helper.cpp.
References cubload::LDR_MONETARY, and make_constant().
constant_type * cubload::semantic_helper::make_real | ( | string_type * | str | ) |
Definition at line 174 of file load_semantic_helper.cpp.
References cubload::LDR_DOUBLE, cubload::LDR_FLOAT, cubload::LDR_NUMERIC, make_constant(), NULL, and cubload::string_type::val.
|
private |
Definition at line 236 of file load_semantic_helper.cpp.
References m_string_list, m_string_pool, m_string_pool_idx, cubload::string_type::need_free_val, NULL, cubload::string_type::size, cubload::STRING_POOL_SIZE, and cubload::string_type::val.
Referenced by make_string_and_copy(), and make_string_by_buffer().
|
private |
Definition at line 259 of file load_semantic_helper.cpp.
References m_copy_buf_pool, m_copy_buf_pool_idx, make_string(), use_copy_buf_pool(), and cubload::string_type::val.
Referenced by make_string_by_buffer(), and make_string_by_yytext().
string_type * cubload::semantic_helper::make_string_by_buffer | ( | ) |
Definition at line 115 of file load_semantic_helper.cpp.
References is_utf8_valid(), m_qstr_buf_idx, m_qstr_buf_ptr, m_use_qstr_buf, make_string(), make_string_and_copy(), and NULL.
string_type * cubload::semantic_helper::make_string_by_yytext | ( | const char * | text, |
int | text_size | ||
) |
Definition at line 138 of file load_semantic_helper.cpp.
References is_utf8_valid(), make_string_and_copy(), and NULL.
|
delete |
void cubload::semantic_helper::reset_after_batch | ( | ) |
Definition at line 225 of file load_semantic_helper.cpp.
References m_in_instance_line, m_qstr_buf_idx, m_qstr_buf_ptr, m_use_qstr_buf, NULL, and reset_after_line().
Referenced by cubload::driver::parse().
void cubload::semantic_helper::reset_after_line | ( | ) |
Definition at line 202 of file load_semantic_helper.cpp.
References clear(), m_constant_pool_idx, m_copy_buf_pool_idx, m_qstr_buf_pool_idx, and m_string_pool_idx.
Referenced by reset_after_batch().
void cubload::semantic_helper::set_in_instance_line | ( | bool | in_instance_line | ) |
Definition at line 219 of file load_semantic_helper.cpp.
References in_instance_line(), and m_in_instance_line.
void cubload::semantic_helper::set_quoted_string_buffer | ( | ) |
Definition at line 98 of file load_semantic_helper.cpp.
References extend_quoted_string_buffer(), m_qstr_buf_idx, m_qstr_buf_pool, m_qstr_buf_pool_idx, m_qstr_buf_ptr, m_use_qstr_buf, cubload::MAX_QUOTED_STR_BUF_SIZE, and cubload::QUOTED_STR_BUF_POOL_SIZE.
|
private |
Definition at line 302 of file load_semantic_helper.cpp.
References cubload::COPY_BUF_POOL_SIZE, m_copy_buf_pool_idx, and cubload::MAX_COPY_BUF_SIZE.
Referenced by make_string_and_copy().
|
private |
Definition at line 108 of file load_semantic_helper.hpp.
Referenced by clear(), make_constant(), and semantic_helper().
|
private |
Definition at line 107 of file load_semantic_helper.hpp.
Referenced by make_constant(), and semantic_helper().
|
private |
Definition at line 106 of file load_semantic_helper.hpp.
Referenced by make_constant(), reset_after_line(), and semantic_helper().
|
private |
Definition at line 103 of file load_semantic_helper.hpp.
Referenced by make_string_and_copy(), and semantic_helper().
|
private |
Definition at line 102 of file load_semantic_helper.hpp.
Referenced by make_string_and_copy(), reset_after_line(), semantic_helper(), and use_copy_buf_pool().
|
private |
Definition at line 95 of file load_semantic_helper.hpp.
Referenced by in_instance_line(), reset_after_batch(), and set_in_instance_line().
|
private |
Definition at line 113 of file load_semantic_helper.hpp.
Referenced by extend_quoted_string_buffer(), and semantic_helper().
|
private |
Definition at line 115 of file load_semantic_helper.hpp.
Referenced by append_char(), make_string_by_buffer(), reset_after_batch(), semantic_helper(), and set_quoted_string_buffer().
|
private |
Definition at line 117 of file load_semantic_helper.hpp.
Referenced by semantic_helper(), and set_quoted_string_buffer().
|
private |
Definition at line 118 of file load_semantic_helper.hpp.
Referenced by append_char(), reset_after_line(), semantic_helper(), and set_quoted_string_buffer().
|
private |
Definition at line 114 of file load_semantic_helper.hpp.
Referenced by append_char(), extend_quoted_string_buffer(), make_string_by_buffer(), reset_after_batch(), semantic_helper(), and set_quoted_string_buffer().
|
private |
Definition at line 99 of file load_semantic_helper.hpp.
Referenced by clear(), make_string(), and semantic_helper().
|
private |
Definition at line 98 of file load_semantic_helper.hpp.
Referenced by clear(), and make_string().
|
private |
Definition at line 97 of file load_semantic_helper.hpp.
Referenced by clear(), make_string(), and reset_after_line().
|
private |
Definition at line 111 of file load_semantic_helper.hpp.
Referenced by append_char(), make_string_by_buffer(), reset_after_batch(), semantic_helper(), and set_quoted_string_buffer().