CUBRID Engine  latest
cubload::semantic_helper Class Reference

#include <load_semantic_helper.hpp>

Collaboration diagram for cubload::semantic_helper:
Collaboration graph

Public Member Functions

 semantic_helper ()
 
 semantic_helper (const semantic_helper &copy)=delete
 
semantic_helperoperator= (const semantic_helper &other)=delete
 
 ~semantic_helper ()
 
void append_char (char c)
 
string_typeappend_string_list (string_type *head, string_type *tail)
 
constant_typeappend_constant_list (constant_type *head, constant_type *tail)
 
void set_quoted_string_buffer ()
 
string_typemake_string_by_buffer ()
 
string_typemake_string_by_yytext (const char *text, int text_size)
 
constant_typemake_constant (int type, void *val)
 
constant_typemake_real (string_type *str)
 
constant_typemake_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_typemake_string (char *val, std::size_t size, bool need_free_val)
 
string_typemake_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
 

Detailed Description

Definition at line 62 of file load_semantic_helper.hpp.

Constructor & Destructor Documentation

cubload::semantic_helper::semantic_helper ( const semantic_helper copy)
delete
cubload::semantic_helper::~semantic_helper ( )

Definition at line 54 of file load_semantic_helper.cpp.

References clear().

Member Function Documentation

void cubload::semantic_helper::append_char ( char  c)
constant_type * cubload::semantic_helper::append_constant_list ( constant_type head,
constant_type tail 
)

Definition at line 92 of file load_semantic_helper.cpp.

template<typename T >
T * cubload::semantic_helper::append_list ( T *  head,
T *  tail 
)
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.

void cubload::semantic_helper::clear ( void  )
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().

Here is the caller graph for this function:

void cubload::semantic_helper::extend_quoted_string_buffer ( size_t  new_size)
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

bool cubload::semantic_helper::is_utf8_valid ( string_type str)
private
constant_type * cubload::semantic_helper::make_constant ( int  type,
void *  val 
)
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)
string_type * cubload::semantic_helper::make_string ( char *  val,
std::size_t  size,
bool  need_free_val 
)
private
string_type * cubload::semantic_helper::make_string_and_copy ( const char *  src,
size_t  str_size 
)
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().

Here is the caller graph for this function:

string_type * cubload::semantic_helper::make_string_by_buffer ( )
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.

semantic_helper& cubload::semantic_helper::operator= ( const semantic_helper other)
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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.

bool cubload::semantic_helper::use_copy_buf_pool ( std::size_t  str_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().

Here is the caller graph for this function:

Member Data Documentation

std::forward_list<constant_type *> cubload::semantic_helper::m_constant_list
private

Definition at line 108 of file load_semantic_helper.hpp.

Referenced by clear(), make_constant(), and semantic_helper().

constant_type cubload::semantic_helper::m_constant_pool[CONSTANT_POOL_SIZE]
private

Definition at line 107 of file load_semantic_helper.hpp.

Referenced by make_constant(), and semantic_helper().

std::size_t cubload::semantic_helper::m_constant_pool_idx
private

Definition at line 106 of file load_semantic_helper.hpp.

Referenced by make_constant(), reset_after_line(), and semantic_helper().

char cubload::semantic_helper::m_copy_buf_pool[COPY_BUF_POOL_SIZE][MAX_COPY_BUF_SIZE]
private

Definition at line 103 of file load_semantic_helper.hpp.

Referenced by make_string_and_copy(), and semantic_helper().

std::size_t cubload::semantic_helper::m_copy_buf_pool_idx
private
bool cubload::semantic_helper::m_in_instance_line
private
cubmem::extensible_block cubload::semantic_helper::m_qstr_buf
private

Definition at line 113 of file load_semantic_helper.hpp.

Referenced by extend_quoted_string_buffer(), and semantic_helper().

std::size_t cubload::semantic_helper::m_qstr_buf_idx
private
char cubload::semantic_helper::m_qstr_buf_pool[QUOTED_STR_BUF_POOL_SIZE][MAX_QUOTED_STR_BUF_SIZE]
private

Definition at line 117 of file load_semantic_helper.hpp.

Referenced by semantic_helper(), and set_quoted_string_buffer().

std::size_t cubload::semantic_helper::m_qstr_buf_pool_idx
private
char* cubload::semantic_helper::m_qstr_buf_ptr
private
std::forward_list<string_type *> cubload::semantic_helper::m_string_list
private

Definition at line 99 of file load_semantic_helper.hpp.

Referenced by clear(), make_string(), and semantic_helper().

string_type cubload::semantic_helper::m_string_pool[STRING_POOL_SIZE]
private

Definition at line 98 of file load_semantic_helper.hpp.

Referenced by clear(), and make_string().

std::size_t cubload::semantic_helper::m_string_pool_idx
private

Definition at line 97 of file load_semantic_helper.hpp.

Referenced by clear(), make_string(), and reset_after_line().

bool cubload::semantic_helper::m_use_qstr_buf
private

The documentation for this class was generated from the following files: