list_parsing.cpp File Reference

#include "list_parsing.h"
#include "parser_bits.h"
#include <basis/istring.h>
#include <basis/log_base.h>
#include <basis/set.cpp>
#include <data_struct/string_table.h>
#include <ctype.h>

Include dependency graph for list_parsing.cpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LOG(to_print)   CLASS_EMERGENCY_LOG(program_wide_logger(), to_print)
#define ADD_TO_VALUES()
#define LOC_VALID(loc)   if( (loc) < 0 ) return false;
#define handle_escapes
#define ADD_LINE_TO_FIELDS(new_line)

Variables

const int ARRAY_PREFILL_AMOUNT = 7


Define Documentation

#define ADD_LINE_TO_FIELDS ( new_line   ) 

Value:

{ \
  storage_slot++;  /* move to next place to store item. */ \
  /* make sure we have enough space for the next slot and then some. */ \
/*LOG(isprintf("fields curr=%d stowslot=%d", fields.length(), storage_slot));*/ \
  if (fields.length() < storage_slot + 2) \
    fields.insert(fields.length(), ARRAY_PREFILL_AMOUNT); \
/*LOG(isprintf("now fields=%d stowslot=%d", fields.length(), storage_slot));*/ \
  fields[storage_slot] = new_line; \
}

Definition at line 255 of file list_parsing.cpp.

Referenced by list_parsing::parse_csv_line().

 
#define ADD_TO_VALUES (  ) 

Value:

string.substring(value, start, end - 1); \
    if( true == strip_spaces ) value.strip_spaces(); \
    if( value.length() > 0 ) values += value;

Definition at line 135 of file list_parsing.cpp.

Referenced by list_parsing::get_values_from_string().

#define handle_escapes

Value:

if (to_parse[i] == '\\') { \
    if (to_parse[i + 1] == '"') { \
      i++; \
      accumulator += to_parse[i]; \
      continue; /* skip normal handling in sequel. */ \
    } \
  }

Definition at line 243 of file list_parsing.cpp.

Referenced by list_parsing::parse_csv_line().

#define LOC_VALID ( loc   )     if( (loc) < 0 ) return false;

Definition at line 161 of file list_parsing.cpp.

Referenced by list_parsing::get_rest_of_line(), and list_parsing::get_separated_value().

#define LOG ( to_print   )     CLASS_EMERGENCY_LOG(program_wide_logger(), to_print)

Definition at line 32 of file list_parsing.cpp.


Variable Documentation

const int ARRAY_PREFILL_AMOUNT = 7

Definition at line 252 of file list_parsing.cpp.


Generated on Fri Nov 28 04:30:24 2008 for HOOPLE Libraries by  doxygen 1.5.1