Ignore:
Timestamp:
Apr 14, 2012, 10:43:12 PM (7 years ago)
Author:
ksherdy
Message:

Added GIDData as a member of class Symbol Table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/src/symbol_table.hpp

    r2027 r2028  
    1111#include "../lib/bitblock.hpp"
    1212#include "../lib/byte_pool.hpp"
    13 #include "gid_factory.hpp"
     13#include "gid.hpp"
    1414#include "hash_table.hpp"
    1515
     
    2525public:
    2626    Symbol (uint32_t n) {
    27         init(n);
     27                        init(n);
    2828    }
    2929
    3030    void init(uint32_t n) {
    31         gids.reserve(n);
    32         //gids_idx.reserve((n/BLOCK_SIZE) + 1);
     31                        gids.reserve(n);
     32                        //gids_idx.reserve((n/BLOCK_SIZE) + 1);
    3333    }
    3434
     
    3737};
    3838
    39 ///////////////////////////////////////////////////////////////////////////
    40 // GID indexed POD array
    41 ///////////////////////////////////////////////////////////////////////////
    42 
    4339template <class SYMBOL> class symbol_table{
    4440public:
     
    4642                 BitBlock h0 [], BitBlock h1 [], uint32_t blocks, SYMBOL & symbols /*, const uint32_t symbols*/);
    4743
    48     IDISA_ALWAYS_INLINE uint8_t * get_raw_data(uint32_t idx) const { return gid_data::get_raw_bytes(idx); }
    49     IDISA_ALWAYS_INLINE uint32_t get_lgth(uint32_t idx) const { return gid_data::get_bytes_lgth(idx); }
     44    IDISA_ALWAYS_INLINE uint8_t * get_raw_data(uint32_t idx) const { return gid_data.get_raw_bytes(idx); }
     45    IDISA_ALWAYS_INLINE uint32_t get_lgth(uint32_t idx) const { return gid_data.get_bytes_lgth(idx); }
    5046
    5147protected:
     
    5349    ~symbol_table() {}
    5450
    55     GIDFactory gid_factory;
     51    GIDFactory gid_factory;     
     52                GIDData gid_data;               
    5653};
    5754
     
    6259              uint8_t buffer [], const uint32_t lgth,
    6360              uint8_t h0 [], uint8_t h1 [], const uint32_t h_lgth, const uint32_t h_block_size,
    64               SYMBOL & symbols, GIDFactory & gid_factory);
     61              SYMBOL & symbols, GIDFactory & gid_factory, GIDData & gid_data);
    6562
    6663template<class SYMBOL, class HASH_TABLE>
     
    7067              uint8_t buffer [],
    7168              uint8_t h0 [], uint8_t h1 [], const uint32_t h_lgth, const uint32_t h_block_size,
    72               SYMBOL & symbols, GIDFactory & gid_factory);
     69              SYMBOL & symbols, GIDFactory & gid_factory, GIDData & gid_data);
    7370
    7471#endif // SYMBOL_TABLE_HPP
Note: See TracChangeset for help on using the changeset viewer.