exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
sTables.c File Reference

Implementation of functions describing EXI sting tables operations. More...

#include "sTables.h"
#include "stringManipulate.h"
#include "memManagement.h"
#include "hashtable.h"
#include "dynamicArray.h"

Go to the source code of this file.

Macros

#define URI_1_LN_SIZE   4
 
#define URI_2_LN_SIZE   2
 
#define URI_3_LN_SIZE   46
 

Functions

errorCode createValueTable (ValueTable *valueTable)
 Creates fresh empty ValueTable (value partition of EXI string table) This operation includes allocation of memory for DEFAULT_VALUE_ENTRIES_NUMBER number of value entries. More...
 
errorCode addUriEntry (UriTable *uriTable, String uriStr, SmallIndex *uriEntryId)
 Add new row into the URI string table. More...
 
errorCode addLnEntry (LnTable *lnTable, String lnStr, Index *lnEntryId)
 Add new row into the Local-Names string table. More...
 
errorCode addValueEntry (EXIStream *strm, String valueStr, QNameID qnameID)
 Add a new row into the Global ValueTable string table and Local value cross string table. More...
 
errorCode addPfxEntry (PfxTable *pfxTable, String pfxStr, SmallIndex *pfxEntryId)
 Add a new entry into the Prefix string table. More...
 
errorCode createUriTableEntry (UriTable *uriTable, const String uri, int createPfx, const String pfx, const String *lnBase, Index lnSize)
 Create an initial string table entry Create an initial string table entry, including URI, prefix and local name partitions. More...
 
errorCode createUriTableEntries (UriTable *uriTable, boolean withSchema)
 Create all string table partitions for a URI table It also inserts the default entries in the table. More...
 
boolean lookupUri (UriTable *uriTable, String uriStr, SmallIndex *uriEntryId)
 Search the URI table for a particular string value Implements full scan. More...
 
boolean lookupLn (LnTable *lnTable, String lnStr, Index *lnEntryId)
 Search the local names table for a particular string value Implements full scan RCC 20120201: Try to optimize? More...
 
boolean lookupPfx (PfxTable *pfxTable, String pfxStr, SmallIndex *pfxEntryId)
 Search the Prefix table for a particular string value Implements full scan. More...
 
boolean lookupValue (ValueTable *valueTable, String valueStr, Index *valueEntryId)
 Search the global Value table for a particular string value Implements full scan when opts->valuePartitionCapacity < DEFAULT_VALUE_ROWS_NUMBER Hash search otherwise. More...
 

Variables

CharType ops_URI_1 []
 START_STRINGS_DEFINITONS. More...
 
CharType ops_PFX_1_0 []
 
CharType ops_LN_1_0 []
 
CharType ops_LN_1_1 []
 
CharType ops_LN_1_2 []
 
CharType ops_LN_1_3 []
 
CharType ops_URI_2 []
 
CharType ops_PFX_2_0 []
 
CharType ops_LN_2_0 []
 
CharType ops_LN_2_1 []
 
CharType ops_URI_3 []
 
CharType ops_LN_3_0 []
 
CharType ops_LN_3_1 []
 
CharType ops_LN_3_2 []
 
CharType ops_LN_3_3 []
 
CharType ops_LN_3_4 []
 
CharType ops_LN_3_5 []
 
CharType ops_LN_3_6 []
 
CharType ops_LN_3_7 []
 
CharType ops_LN_3_8 []
 
CharType ops_LN_3_9 []
 
CharType ops_LN_3_10 []
 
CharType ops_LN_3_11 []
 
CharType ops_LN_3_12 []
 
CharType ops_LN_3_13 []
 
CharType ops_LN_3_14 []
 
CharType ops_LN_3_15 []
 
CharType ops_LN_3_16 []
 
CharType ops_LN_3_17 []
 
CharType ops_LN_3_18 []
 
CharType ops_LN_3_19 []
 
CharType ops_LN_3_20 []
 
CharType ops_LN_3_21 []
 
CharType ops_LN_3_22 []
 
CharType ops_LN_3_23 []
 
CharType ops_LN_3_24 []
 
CharType ops_LN_3_25 []
 
CharType ops_LN_3_26 []
 
CharType ops_LN_3_27 []
 
CharType ops_LN_3_28 []
 
CharType ops_LN_3_29 []
 
CharType ops_LN_3_30 []
 
CharType ops_LN_3_31 []
 
CharType ops_LN_3_32 []
 
CharType ops_LN_3_33 []
 
CharType ops_LN_3_34 []
 
CharType ops_LN_3_35 []
 
CharType ops_LN_3_36 []
 
CharType ops_LN_3_37 []
 
CharType ops_LN_3_38 []
 
CharType ops_LN_3_39 []
 
CharType ops_LN_3_40 []
 
CharType ops_LN_3_41 []
 
CharType ops_LN_3_42 []
 
CharType ops_LN_3_43 []
 
CharType ops_LN_3_44 []
 
CharType ops_LN_3_45 []
 
const String XML_NAMESPACE = {ops_URI_1, 36}
 
const String XML_SCHEMA_INSTANCE = {ops_URI_2, 41}
 
const String XML_SCHEMA_NAMESPACE = {ops_URI_3, 32}
 
const String URI_1_PFX = {ops_PFX_1_0, 3}
 
const String URI_2_LN [] = {{ops_LN_2_0, 3}, {ops_LN_2_1, 4}}
 

Detailed Description

Date
Sep 21, 2010
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: sTables.c 353 2014-11-25 16:43:28Z kjussakov $

Definition in file sTables.c.

Macro Definition Documentation

#define URI_1_LN_SIZE   4

Definition at line 90 of file sTables.c.

#define URI_2_LN_SIZE   2

Definition at line 93 of file sTables.c.

#define URI_3_LN_SIZE   46

Definition at line 96 of file sTables.c.

Function Documentation

errorCode addLnEntry ( LnTable lnTable,
String  lnStr,
Index lnEntryId 
)
Parameters
[out]lnTableLocal Names string table partition
[in]lnStrThe string representing this local name. The String can be allocated on the stack.
[out]lnEntryIdthe ID of the LnEntry added
Returns
Error handling code

Definition at line 182 of file sTables.c.

errorCode addPfxEntry ( PfxTable pfxTable,
String  pfxStr,
SmallIndex pfxEntryId 
)
Parameters
[in,out]pfxTablePrefix string table partition
[in]pfxStrThe string representing this prefix. The String can be allocated on the stack.
[out]pfxEntryIdthe ID of the PfxEntry added
Returns
Error handling code

Definition at line 293 of file sTables.c.

errorCode addUriEntry ( UriTable uriTable,
String  uriStr,
SmallIndex uriEntryId 
)
Parameters
[in,out]uriTableURI string table partition
[in]uriStrThe string representing this URI. The String can be allocated on the stack.
[out]uriEntryIdThe ID of the UriEntry added
Returns
Error handling code

Definition at line 161 of file sTables.c.

errorCode addValueEntry ( EXIStream strm,
String  valueStr,
QNameID  qnameID 
)
Parameters
[in,out]strmEXI stream of bits
[in]valueStrThe string representing this global value. The String can be allocated on the stack.
[in]qnameIDThe URI:ln QNameID
Returns
Error handling code

Definition at line 200 of file sTables.c.

errorCode createUriTableEntries ( UriTable uriTable,
boolean  withSchema 
)

Because the behavior depends on the EXI options of the stream it is important that the options are initialized before calling this function.

Parameters
[in,out]uriTableAn empty UriTable; The memory must be already allocated for it
[in]withSchemaTRUE if there is schema for this stream; FALSE otherwise; Can be retrieved from strm->opts->schemaID != NULL
Returns
Error handling code

Definition at line 332 of file sTables.c.

errorCode createUriTableEntry ( UriTable uriTable,
const String  uri,
int  createPfx,
const String  pfx,
const String lnBase,
Index  lnSize 
)
Parameters
[in,out]uriTableURI string table partition
[in]urinamespace string
[in]createPfxTRUE if prefix table to be created, FALSE otherwise
[in]pfxprefix string
[in]lnBaseCharacter array representing array of local names, or NULL if not present
[in]lnSizeNumber of local names in array at lnBase
Returns
Error handling code

Definition at line 307 of file sTables.c.

errorCode createValueTable ( ValueTable valueTable)
Parameters
[in,out]valueTableValueTable string table partition
Returns
Error handling code

Definition at line 148 of file sTables.c.

boolean lookupLn ( LnTable lnTable,
String  lnStr,
Index lnEntryId 
)
Parameters
[in]lnTableLocal names table to be searched
[in]lnStrThe local name string searched for
[out]lnEntryIdif found, ID of the LnEntry with that string
Returns
FALSE-not found, TRUE found

Definition at line 396 of file sTables.c.

boolean lookupPfx ( PfxTable pfxTable,
String  pfxStr,
SmallIndex pfxEntryId 
)
Parameters
[in]pfxTablePrefix table to be searched
[in]pfxStrThe string searched for
[out]pfxEntryIdif found, ID of the Prefix row with that string
Returns
FALSE-not found, TRUE found

Definition at line 413 of file sTables.c.

boolean lookupUri ( UriTable uriTable,
String  uriStr,
SmallIndex uriEntryId 
)
Parameters
[in]uriTableURI table to be searched
[in]uriStrThe string searched for
[out]uriEntryIdIf found, ID of the UriEntry with that string
Returns
FALSE-not found, TRUE found

Definition at line 378 of file sTables.c.

boolean lookupValue ( ValueTable valueTable,
String  valueStr,
Index valueEntryId 
)
Parameters
[in]valueTableGlobal Value table to be searched
[in]valueStrThe string searched for
[out]valueEntryIdif found, ID of the ValueEntry with that string
Returns
FALSE-not found, TRUE found

Definition at line 454 of file sTables.c.

Variable Documentation

CharType ops_LN_1_0[]

Definition at line 16 of file staticEXIOptions.c.

CharType ops_LN_1_1[]

Definition at line 17 of file staticEXIOptions.c.

CharType ops_LN_1_2[]

Definition at line 18 of file staticEXIOptions.c.

CharType ops_LN_1_3[]

Definition at line 19 of file staticEXIOptions.c.

CharType ops_LN_2_0[]

Definition at line 22 of file staticEXIOptions.c.

CharType ops_LN_2_1[]

Definition at line 23 of file staticEXIOptions.c.

CharType ops_LN_3_0[]

Definition at line 25 of file staticEXIOptions.c.

CharType ops_LN_3_1[]

Definition at line 26 of file staticEXIOptions.c.

CharType ops_LN_3_10[]

Definition at line 35 of file staticEXIOptions.c.

CharType ops_LN_3_11[]

Definition at line 36 of file staticEXIOptions.c.

CharType ops_LN_3_12[]

Definition at line 37 of file staticEXIOptions.c.

CharType ops_LN_3_13[]

Definition at line 38 of file staticEXIOptions.c.

CharType ops_LN_3_14[]

Definition at line 39 of file staticEXIOptions.c.

CharType ops_LN_3_15[]

Definition at line 40 of file staticEXIOptions.c.

CharType ops_LN_3_16[]

Definition at line 41 of file staticEXIOptions.c.

CharType ops_LN_3_17[]

Definition at line 42 of file staticEXIOptions.c.

CharType ops_LN_3_18[]

Definition at line 43 of file staticEXIOptions.c.

CharType ops_LN_3_19[]

Definition at line 44 of file staticEXIOptions.c.

CharType ops_LN_3_2[]

Definition at line 27 of file staticEXIOptions.c.

CharType ops_LN_3_20[]

Definition at line 45 of file staticEXIOptions.c.

CharType ops_LN_3_21[]

Definition at line 46 of file staticEXIOptions.c.

CharType ops_LN_3_22[]

Definition at line 47 of file staticEXIOptions.c.

CharType ops_LN_3_23[]

Definition at line 48 of file staticEXIOptions.c.

CharType ops_LN_3_24[]

Definition at line 49 of file staticEXIOptions.c.

CharType ops_LN_3_25[]

Definition at line 50 of file staticEXIOptions.c.

CharType ops_LN_3_26[]

Definition at line 51 of file staticEXIOptions.c.

CharType ops_LN_3_27[]

Definition at line 52 of file staticEXIOptions.c.

CharType ops_LN_3_28[]

Definition at line 53 of file staticEXIOptions.c.

CharType ops_LN_3_29[]

Definition at line 54 of file staticEXIOptions.c.

CharType ops_LN_3_3[]

Definition at line 28 of file staticEXIOptions.c.

CharType ops_LN_3_30[]

Definition at line 55 of file staticEXIOptions.c.

CharType ops_LN_3_31[]

Definition at line 56 of file staticEXIOptions.c.

CharType ops_LN_3_32[]

Definition at line 57 of file staticEXIOptions.c.

CharType ops_LN_3_33[]

Definition at line 58 of file staticEXIOptions.c.

CharType ops_LN_3_34[]

Definition at line 59 of file staticEXIOptions.c.

CharType ops_LN_3_35[]

Definition at line 60 of file staticEXIOptions.c.

CharType ops_LN_3_36[]

Definition at line 61 of file staticEXIOptions.c.

CharType ops_LN_3_37[]

Definition at line 62 of file staticEXIOptions.c.

CharType ops_LN_3_38[]

Definition at line 63 of file staticEXIOptions.c.

CharType ops_LN_3_39[]

Definition at line 64 of file staticEXIOptions.c.

CharType ops_LN_3_4[]

Definition at line 29 of file staticEXIOptions.c.

CharType ops_LN_3_40[]

Definition at line 65 of file staticEXIOptions.c.

CharType ops_LN_3_41[]

Definition at line 66 of file staticEXIOptions.c.

CharType ops_LN_3_42[]

Definition at line 67 of file staticEXIOptions.c.

CharType ops_LN_3_43[]

Definition at line 68 of file staticEXIOptions.c.

CharType ops_LN_3_44[]

Definition at line 69 of file staticEXIOptions.c.

CharType ops_LN_3_45[]

Definition at line 70 of file staticEXIOptions.c.

CharType ops_LN_3_5[]

Definition at line 30 of file staticEXIOptions.c.

CharType ops_LN_3_6[]

Definition at line 31 of file staticEXIOptions.c.

CharType ops_LN_3_7[]

Definition at line 32 of file staticEXIOptions.c.

CharType ops_LN_3_8[]

Definition at line 33 of file staticEXIOptions.c.

CharType ops_LN_3_9[]

Definition at line 34 of file staticEXIOptions.c.

CharType ops_PFX_1_0[]

Definition at line 15 of file staticEXIOptions.c.

CharType ops_PFX_2_0[]

Definition at line 21 of file staticEXIOptions.c.

CharType ops_URI_1[]

Definition at line 14 of file staticEXIOptions.c.

CharType ops_URI_2[]

Definition at line 20 of file staticEXIOptions.c.

CharType ops_URI_3[]

Definition at line 24 of file staticEXIOptions.c.

const String URI_1_PFX = {ops_PFX_1_0, 3}

Definition at line 87 of file sTables.c.

const String URI_2_LN[] = {{ops_LN_2_0, 3}, {ops_LN_2_1, 4}}

Definition at line 94 of file sTables.c.

const String XML_NAMESPACE = {ops_URI_1, 36}

Definition at line 83 of file sTables.c.

const String XML_SCHEMA_INSTANCE = {ops_URI_2, 41}

Definition at line 84 of file sTables.c.

const String XML_SCHEMA_NAMESPACE = {ops_URI_3, 32}

Definition at line 85 of file sTables.c.