t_stringtab.cpp File Reference

#include <basis/byte_array.h>
#include <basis/guards.h>
#include <basis/istring.h>
#include <data_struct/matrix.cpp>
#include <data_struct/string_table.h>
#include <mechanisms/time_stamp.h>
#include <loggers/console_logger.h>
#include <data_struct/static_memory_gremlin.h>
#include <textual/string_manipulation.h>
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for t_stringtab.cpp:

Go to the source code of this file.

Defines

#define LOG(to_print)   { out.log(to_print); }
#define WHERE   __WHERE__.s()
#define static_class_name()   "test_string_table"

Functions

void ADD (string_table &syms, const istring &name, const istring &to_add)
void FIND (const string_table &syms, const istring &name, const istring &to_find)
void test_string_table ()
int main (int formal(argc), char *formal(argv)[])

Variables

const int test_iterations = 100
const int FIND_ITERATIONS = 100
const int MAXIMUM_RANDOM_ADDS = 200
const int TEST_SIZE_TABLE_COUNT = 10000
console_logger out
 HOOPLE_STARTUP_CODE
double time_in_add = 0
double time_in_find = 0
double time_in_pack = 0
double time_in_unpack = 0
u_int operations = 0


Define Documentation

#define LOG ( to_print   )     { out.log(to_print); }

Definition at line 50 of file t_stringtab.cpp.

 
#define static_class_name (  )     "test_string_table"

Definition at line 90 of file t_stringtab.cpp.

#define WHERE   __WHERE__.s()

Definition at line 54 of file t_stringtab.cpp.


Function Documentation

void ADD ( string_table syms,
const istring name,
const istring to_add 
)

Definition at line 62 of file t_stringtab.cpp.

References symbol_table< contents >::add(), deadly_error, common::EXISTING, operations, time_in_add, time_stamp::value(), and WHERE.

void FIND ( const string_table syms,
const istring name,
const istring to_find 
)

Definition at line 73 of file t_stringtab.cpp.

References deadly_error, symbol_table< contents >::find(), FIND_ITERATIONS, operations, time_in_find, time_stamp::value(), and WHERE.

int main ( int   formal(argc),
char *  formal(argv)[] 
)

Definition at line 280 of file t_stringtab.cpp.

References guards::alert_message(), operations, out, istring::SPRINTF, test_string_table(), time_in_add, time_in_find, time_in_pack, time_in_unpack, and timestamp().

void test_string_table (  ) 

Definition at line 92 of file t_stringtab.cpp.

References symbol_table< contents >::add(), ADD, guards::alert_message(), deadly_error, symbol_table< contents >::find(), FIND, FUNCDEF, LOG, string_manipulation::make_random_name(), MAXIMUM_RANDOM_ADDS, operations, string_table::pack(), time_stamp::reset(), symbol_table< contents >::reset(), istring::s(), istring::SPRINTF, static_class_name, istring::t(), test_iterations, TEST_SIZE_TABLE_COUNT, string_table::text_form(), time_in_pack, time_in_unpack, string_table::unpack(), time_stamp::value(), and WHERE.

Referenced by main().


Variable Documentation

const int FIND_ITERATIONS = 100

Definition at line 41 of file t_stringtab.cpp.

Referenced by FIND().

HOOPLE_STARTUP_CODE

Definition at line 52 of file t_stringtab.cpp.

const int MAXIMUM_RANDOM_ADDS = 200

Definition at line 42 of file t_stringtab.cpp.

Referenced by creatapose(), test_byte_table(), and test_string_table().

u_int operations = 0

Definition at line 60 of file t_stringtab.cpp.

Referenced by ADD(), FIND(), main(), and test_string_table().

console_logger out

Definition at line 48 of file t_stringtab.cpp.

const int test_iterations = 100

Definition at line 39 of file t_stringtab.cpp.

const int TEST_SIZE_TABLE_COUNT = 10000

Definition at line 44 of file t_stringtab.cpp.

Referenced by test_string_table().

double time_in_add = 0

Definition at line 56 of file t_stringtab.cpp.

Referenced by ADD(), ADD2(), and main().

double time_in_find = 0

Definition at line 57 of file t_stringtab.cpp.

Referenced by FIND(), and main().

double time_in_pack = 0

Definition at line 58 of file t_stringtab.cpp.

Referenced by main(), test_byte_table(), and test_string_table().

double time_in_unpack = 0

Definition at line 59 of file t_stringtab.cpp.

Referenced by main(), test_byte_table(), and test_string_table().


Generated on Fri Sep 5 04:30:09 2008 for HOOPLE Libraries by  doxygen 1.5.1