Regular Statement String v2 Function Manual
by Liu Rui
3 Dec 2003
1. ChrPtr functions.
C: void ChrPtrFree(ChrPtr
value);
Free ChrPtr value.
value: the ChrPtr.
C: int ChrPtrLen(ChrPtr
value);
Get length of the ChrPtr value.
value: the ChrPtr.
Return value: the length.
2. RSS basic functions.
C: int RssValid(char
*rss);
Java: int RssValid(byte[] rss);
(import rss.Rsst4j;)
VB: Function Valid(Rss As String) As
Long (Class Rsso)
Test if a string is a valid RSS.
Return value: A non zero value indicate it is invalid.
C: int RssValidKey(char
*key);
Java: int RssValidKey(String key);
(import rss.Rsst4j;)
VB: Function ValidKey(Key As String)
As Long (Class Rsso)
Test if a key name is valid. Character ASCII(96) is not a valid character
in a key name.
Return value: A non zero value indicate it is invalid.
3. RSST basic functions.
C: void RsstInit (Rsst
*rsst, int unit_size);
Initialize the Rsst.
rsst: point to the Rsst to be Initialized.
unit_size: the allocation unix size for Rsst. Use the default size
if it's 0.
C: void RsstClose(Rsst
*rsst);
Close the Rsst.
rsst: point to the Rsst to be Initialized.
C: int RsstCheck(Rsst
*rsst);
Java: int Check(); (import rss.Rsst4j;)
VB: Function Check() As Long
Check if the Rsst is valid.
rsst: point to the Rsst to be Initialized.
Return value: A non zero value indicate it is invalid.
C: void RsstSetRss(Rsst
*rsst, char *rss0);
C: void RsstSetRssNum(Rsst
*rsst, char *rss1, int n);
Java: void setRss(byte[] rss);
(import rss.Rsst4j;)
VB: Property Rss As Variant (Class
Rsso)
Set RSS to the Rsst.
rsst: point to the Rsst to be used.
rss0: the RSS with a terminated zero character
rss1: point to the RSS
n: the length of the RSS
C: char * RsstGetRss0(Rsst
*rsst);
C: ChrPtr RsstGetRss
(Rsst *rsst);
Java: byte[] getRss(); (import
rss.Rsst4j;)
VB: Property Rss As Variant (Class
Rsso)
Get RSS from the Rsst.
rsst: point to the Rsst to be used.
Return value: the RSS inside Rsst.
C: void RsstClear(Rsst
*rsst);
Java: void Clear(); (import
rss.Rsst4j;)
VB: Sub Clear() (Class Rsso)
Clear data inside Rsst.
rsst: point to the Rsst to be used.
C: void RsstRssLoad(Rsst
*rsst, char *filename);
Java: void RssLoad(String filename)
(import rss.Rsst4j;)
VB: Sub RssLoad(FileName As String)
(Class Rsso)
Load RSS from file.
rsst: point to the Rsst to be used.
filename: the name of the file containing RSS.
C: void RsstRssDump(Rsst
*rsst, char *filename);
Java: void RssDump(String filename)
(import rss.Rsst4j;)
VB: Sub RssDump(String filename)
(Class Rsso)
Dump RSS to file.
rsst: point to the Rsst to be used.
filename: the name of the file containing RSS.
C: int RsstGetLen(Rsst
*rsst);
Java: int getLen();
(import rss.Rsst4j;)
VB: Property Len As Long
read-only (import Rsso)
Get the length of current RSS.
rsst: point to the Rsst to be used.
Return value: The length of current RSS.
C: int RsstGetMaxLen(Rsst
*rsst);
Java: int getMaxLen();
(import rss.Rsst4j;)
VB: Property MaxLen As Long (Class
Rsso)
Get the maximum length of current RSS.
rsst: point to the Rsst to be used.
Return value: The maximum length of current RSS.
C: void RsstSetMaxLen(Rsst
*rsst, int max_len);
Java: void setMaxLen(int max_len);
(import rss.Rsst4j;)
VB: Property MaxLen As Long (Class Rsso)
Set the maximum length of current RSS.
rsst: point to the Rsst to be used.
max_len: The maximum length of current RSS.
C: int RsstGetMaxValueLen(Rsst
*rsst);
Java: int getMaxValueLen();
(import rss.Rsst4j;)
VB: Property MaxValueLen As Long
(Class Rsso)
Get the maximum length of the values in current RSS.
rsst: point to the Rsst to be used.
Return value: The maximum length of current RSS.
C: void RsstSetMaxValueLen(Rsst
*rsst, int max_len);
Java: void setMaxValueLen(int max_len);
(import rss.Rsst4j;)
VB: Property MaxValueLen As Long
(Class Rsso)
Set the maximum length of the values in current RSS.
rsst: point to the Rsst to be used.
max_len: The maximum length of current RSS.
C: int RsstGetUnitSize(Rsst
*rsst);
Java: int getUnitSize();
(import rss.Rsst4j;)
VB: Property UnitSize As Long
(Class Rsso)
Get the allocation unit size of current RSS.
rsst: point to the Rsst to be used.
Return value: The allocation unit size of current RSS.
C: void RsstSetUnitSize(Rsst
*rsst, int unit_size);
Java: void setUnitSize(int unit_size);
(import rss.Rsst4j;)
VB: Property UnitSize As Long (Class
Rsso)
Set the allocation unit size of current RSS.
rsst: point to the Rsst to be used.
unit_size: The allocation unit size of current RSS.
C: unsigned int RsstGetOption(Rsst
*rsst, unsigned int opt);
Java: int getOption(int opt);
(import rss.Rsst4j;)
VB: Function GetOption(opt As Long)
As Long (Class Rsso)
Get the development option of current RSS.
rsst: point to the Rsst to be used.
opt: the development option. Following are valid values:
RSS_OP_KEY_FAMILY_GET =1 family key is permitted
RSS_OP_KEY_MULTI_LEVEL =2 multi-level is permitted
Return value: non zero indicates the option has been set.
C: void RsstSetOption(Rsst
*rsst, unsigned int opt, unsigned int f);
Java: void setOption(int opt, int f);
(import rss.Rsst4j;)
VB: Sub SetOption(opt As Long, f As
Long) (Class Rsso)
Set the development option of current RSS.
rsst: point to the Rsst to be used.
opt: the development option. Following are valid values:
RSS_OP_KEY_FAMILY_GET =1 family key is permitted
RSS_OP_KEY_MULTI_LEVEL =2 multi-level is permitted
f: non zero indicates the option has been set.
C: int RsstGetRtCode(Rsst
*rsst);
Java: int getRtCode();
(import rss.Rsst4j;)
VB: Property RtCode As Long (Class
Rsso)
Get the internal return code of current RSS.
rsst: point to the Rsst to be used.
Return value: The internal return code.
C: int RsstSetRtCode(Rsst
*rsst, int rtcode);
Java: int setRtCode(int rtcode);
(import rss.Rsst4j;)
VB: Property RtCode As Long (Class
Rsso)
Set the internal return code of current RSS.
rsst: point to the Rsst to be used.
rtcode: the internal return code to be set.
C: int RsstGetStatus(Rsst
*rsst);
Java: int getStatus();
(import rss.Rsst4j;)
VB: Property Status As Long (Class
Rsso)
Get the internal status of current RSS.
rsst: point to the Rsst to be used.
Return value: The internal status.
C: int RsstSetStatus(Rsst
*rsst, int status);
Java: int setStatus(int status);
(import rss.Rsst4j;)
VB: Property Status As Long (Class
Rsso)
Set the internal status of current RSS.
rsst: point to the Rsst to be used.
status: the internal status to be set.
C: Rsst* RsstGetHandle(Rsst
*rsst);
Java: int getHandle();
(import rss.Rsst4j;)
VB: Property Handle As Long (Class
Rsso)
Get the internal handle of current RSS.
rsst: point to the Rsst to be used.
Return value: The internal handle.
C: void RsstSetHandle(Rsst
*rsst, Rsst *handle);
Java: void setHandle(int handle);
(import rss.Rsst4j;)
VB: Property Handle As Long (Class
Rsso)
Set the internal handle of current RSS.
rsst: point to the Rsst to be used.
handle: The internal handle to be set.
C: Rsst* RsstNewHandle
(Rsst *rsst);
Java: int newHandle();
(import rss.Rsst4j;)
VB: Function NewHandle() As Long
(Class Rsso)
Create the internal handle of current RSS.
rsst: point to the Rsst to be used.
Return value: The internal handle.
C: void RsstCloseHandle(Rsst
*rsst);
Java: void closeHandle();
(import rss.Rsst4j;)
VB: Sub CloseHandle() (Class Rsso)
Close the internal handle of current RSS.
rsst: point to the Rsst to be used.
4. Key/value functions.
C: ChrPtr RsstKeyGet(Rsst
*rsst, char *key);
C: char * RsstKeyGet0(Rsst
*rsst, char *key);
Java: byte[] KeyGet(String key) ;
(import rss.Rsst4j;)
VB: Property key(key As String)
(Class Rsso)
Get the value of the key from the current RSS.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
len: the length of the data value.
Return value: A pointer which points to the data value of the key.
There must be a null character at the end of the data when you use function
RsstKeyGet0. Save the value after using RsstKeyGet0 because next RSSF may
change the data pointed by this pointer. An empty string ("") will be returned
if there's something wrong, and you can use RsstGetInternalReturnCode to
get the return code according to the macros "RSS_RT_*" in rss.h.
C: ChrPtr RsstKeyGetM(Rsst
*rsst, char *key, int no);
C: char * RsstKeyGetM0(Rsst
*rsst, char *key, int no);
Java: byte[] KeyGetM(String key, int no);
(import rss.Rsst4j;)
VB: Property KeyM(key As String, No
As Long) (Class Rsso)
Get the one of the values of the key from the current RSS.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
len: the length of the data value.
no: the sequence number of the values (start from one)
Return value: A pointer which points to the data value of the key.
There must be a null character at the end of the data when you use function
RsstKeyGet0. Save the value after using RsstKeyGet0 because next RSSF may
change the data pointed by this pointer. An empty string ("") will be returned
if there's something wrong, and you can use RsstGetInternalReturnCode to
get the return code according to the macros "RSS_RT_*" in rss.h.
C: void RsstKeyPut
(Rsst *rsst, char *key, void *value, int len);
C: void RsstKeyPut0(Rsst
*rsst, char *key, char *value);
Java: void KeyPut(String key, byte[] value);
(import rss.Rsst4j;)
Java: void KeyPut(String key, String value);
(import rss.Rsst4j;)
VB: Property key(key As String)
(Class Rsso)
Put the key with value into the current RSS. If you set an empty
string ("") as value to a key, the key is actually removed from the RSS.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
value: point to the data value of the key. There must be a null character
at the end in function RsstKeyPut0.
len: the length of the data value.
C: void RsstKeyPutM
(Rsst *rsst, char *key, void *value, int len, int no);
C: void RsstKeyPutM0(Rsst
*rsst, char *key, char *value, int no);
Java: void KeyPutM(String key, byte[] value,
int no); (import rss.Rsst4j;)
Java: void KeyPutM(String key, String value,
int no); (import rss.Rsst4j;)
VB: Property KeyM(key As String, No
As Long) (Class Rsso)
Put the key with one of the value into the current RSS, the other values
of this key are not affected.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
value: point to the data value of the key. There must be a null character
at the end in function RsstKeyPutM0.
len: the length of the data value.
no: the sequence number of the values (start from one)
C: int RsstKeyGetInteger(Rsst
*rsst, char *key);
Java: int KeyGetInteger(String key) ;
(import rss.Rsst4j;)
VB: Property KeyInteger(key As String)
As Long (Class Rsso)
Get the integer value of the key from the current RSS.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (.).
Return value: the integer value according to the key. Zero will be
returned if there's something wrong, and you can use RsstGetInternalReturnCode
to get the return code according to the macros "RSS_RT_*" in rss.h.
C: int RsstKeyGetMInteger(Rsst
*rsst, char *key, int no);
Java: int KeyGetMInteger(String key, int no);
(import rss.Rsst4j;)
VB: Property KeyMInteger(key As String,
No As Long) As Long (Class Rsso)
Get one of the values of the key from the current RSS. The value is
an integer.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
Return value: the integer value according to the key. Zero will be
returned if there's something wrong, and you can use RsstGetInternalReturnCode
to get the return code according to the macros "RSS_RT_*" in rss.h.
C: void RsstKeyPutInteger(Rsst
*rsst, char *key, long value);
Java: void KeyPutInteger(String key, int value);
(import rss.Rsst4j;)
VB: Property KeyInteger(key As String)
As Long (Class Rsso)
Put the key with integer value into the current RSS.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
value: the integer data value of the key.
C: void RsstKeyPutMInteger(Rsst
*rsst, char *key, long value, int no);
Java: void KeyPutMInteger(String key, int
value, int no); (import rss.Rsst4j;)
VB: Property KeyMInteger(key As String,
No As Long) As Long (Class Rsso)
Put the key with one of its values into the current RSS, the value is
an integer.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
value: the integer data value of the key.
no: the sequence number of the values (start from one)
C: void RsstKeyCopy(Rsst
*rsst1, Rsst *rsst2, char *key);
Java: static void KeyCopy(Rsst4j rsst1, Rsst4j
rsst2, String key); (import rss.Rsst4j;)
VB: Sub KeyCopy(rsso2 As Rsso, key As
String) (Class Rsso)
Copy the key with its value(s) from the one RSS to anther.
rsst1: point to the Rsst to be copied from.
rsst2: point to the Rsst to be copied to.
rsso2: the Rsso to be copied to.
key: the name of the key (must be null character terminated) to be
copied. If the key is an empty string (""), all keys are copied.
C: void RsstKeyCopyFamily(Rsst
*rsst1, Rsst *rsst2, char *key0);
Java: static void KeyCopyFamily(Rsst4j rsst1,
Rsst4j rsst2, String key0); (import rss.Rsst4j;)
VB: Sub KeyCopyFamily(Rsso2 As Rsso,
Key0 As String) (Class Rsso)
Copy the key family with its value(s) from the one RSS to anther.
rsst1: point to the Rsst to be copied from.
rsst2: point to the Rsst to be copied to.
rsso2: the Rsso to be copied to.
key0: the name of the key family(must be null character terminated)
to be copied.
C: void RsstKeyList(Rsst
*rsst);
Java: void KeyList(); (import rss.Rsst4j;)
VB: Sub KeyList() (Class Rsso)
List the key names into the current array.
rsst: point to the Rsst to be used.
C: void RsstKeyListFamily(Rsst
*rsst, char *key0);
Java: void KeyListFamily(String key0) ;
(import rss.Rsst4j;)
VB: Sub KeyListFamily(key0 As String)
(Class Rsso)
List the key names belonging to the family name into the current array.
rsst: point to the Rsst to be used.
key0: the name of the key family(must be null character terminated)
to be listed.
Return value: non zero indicates there's something wrong with the function,
check macros "RSS_RT_*" in rss.h.
5. Array functions.
C: void RsstArrayFetch(Rsst
*rsst, char *key);
Java: void ArrayFetch(String key) ;
(import rss.Rsst4j;)
VB: Sub ArrayFetch(Key As String)
(Class Rsso)
Fetch the values of the key into the current array.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
C: void RsstArrayNew(Rsst
*rsst);
Java: void ArrayNew(); (import rss.Rsst4j;)
VB: Sub ArrayNew() (Class
Rsso)
Create an empty Array.
rsst: point to the Rsst to be used.
C: void RsstArraySave(Rsst
*rsst, char *key);
Java: void ArraySave(String key) ; (import
rss.Rsst4j;)
VB: Sub ArraySave(Key As String)
(Class Rsso)
Save the current array as values to a key.
rsst: point to the Rsst to be used.
key: the name of the key (must be null character terminated).
C: ChrPtr RsstArrayGet(Rsst
*rsst, int no);
C: char * RsstArrayGet0(Rsst
*rsst, int no);
Java: byte[] ArrayGet(int no) ;
(import rss.Rsst4j;)
VB: Property Array(No As Long)
(Class Rsso)
Get the the value from the specified item of current Array.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
no: the sequence number of the specified item (start from one)
Return value: A pointer which points to the data value of the specified
item of current Array. There must be a null character at the end of the
data when you use function RsstArrayGet0. Save the value after using RsstArrayGet0
because next RSSF may change the data pointed by this pointer. An empty
string ("") will be returned if there's something wrong, and you can use
RsstGetInternalReturnCode to get the return code according to the macros
"RSS_RT_*" in rss.h.
C: void RsstArrayPut(Rsst
*rsst, char *value, int len, int no);
C: void RsstArrayPut0(Rsst
*rsst, char *value, int no);
Java: void ArrayPut(byte[] value, int no);
(import rss.Rsst4j;)
Java: void ArrayPut(String value, int no);
(import rss.Rsst4j;)
VB: Property Array(No As Long)
(Class Rsso)
Put the the value into the specified item of current Array.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
value: point to the data value of the key. There must be a null character
at the end in function RsstArrayPut0.
len: the length of the data value.
no: the sequence number of the specified item (start from one)
C: int RsstArrayGetInteger(Rsst
*rsst, int no);
Java: int ArrayGetInteger(int no) ;
(import rss.Rsst4j;)
VB: Property ArrayInteger(No As Long)
As Long (Class Rsso)
Get the the integer value from the specified item of current Array.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
no: the sequence number of the specified item (start from one)
Return value: the integer value according to the specified item of
current Array. Zero will be returned if there's something wrong,
and you can use RsstGetInternalReturnCode to get the return code according
to the macros "RSS_RT_*" in rss.h.
C: void RsstArrayPutInteger(Rsst
*rsst, long value, int no);
Java: void ArrayPutInteger(int value, int
no); (import rss.Rsst4j;)
VB: Property ArrayInteger(No As Long)
As Long (Class Rsso)
Put the the integer value into the specified item of current Array.
There are some important agreements in RSSF for key and value issues:
-
A standard C RSST related function which returns a value or the internal
RSS has the return type of ChrPtr including any byte array. This ChrPtr
must be released by user.
-
A convenient RSST related function with the form "*Key*Integer" or "*Array*Integer"
deals with keys with a 32 bits integer as its value.
-
Some RSST related function using a character "M" to indicate its a key
with multiple values.
-
A convenient RSST related C function with a suffix "0" which returns a
value or the internal RSS has the return type of "char *" holding a C style
string (zero character ended string). User must not release the pointer.
The next RSSF may change the data pointed by the return pointer.
-
A standard Java RSST related function which has an input argument as a
value or RSS use the type of byte array or String.
-
A standard COM RSST related function which has an input argument as a value
or RSS use the type of VARIANT. The internal type is byte array or BSTR(UNICODE
string).
-
A standard Java RSST related function which returns a value or the internal
RSS has the return type of byte array.
-
A standard COM RSST related function which returns a value or the
internal RSS has the return type of VARIANT, the internal type is byte
array.
-
To set the value of an empty string ("") to a key will remove the key with
its value from RSS
-
To get the value of a key which does not exist in the RSS will returns
an empty string ("") with no error.
-
Never use a null pointer as the input RSST pointer, this is the same as
using an invalid integer as the input RSST pointer, which can cause a severe
address error.
-
RSSF which returns a value or the internal RSS will never return a null
pointer.
rsst: point to the Rsst to be used.
value: the integer data value of the item.
no: the sequence number of the specified item (start from one)
C: int RsstArrayItemNum(Rsst
*rsst);
Java: int ArrayItemNum(); (import rss.Rsst4j;)
VB: Function ArrayItemNum() As Long
(Class Rsso)
Get the total number of items of the current array.
rsst: point to the Rsst to be used.
Return value: non zero indicates there's something wrong with the function,
check macros "RSS_RT_*" in rss.h.
C: void RsstArrayRemoveItem(Rsst
*rsst, int no);
Java: void ArrayRemoveItem(int no);
(import rss.Rsst4j;)
VB: Sub ArrayRemoveItem(No As Long)
(Class Rsso)
Remove the specified item from the current array.
rsst: point to the Rsst to be used.
no: the sequence number of the specified item (start from one)
6. Table functions.
C: void RsstTableCreate(Rsst
*rsst, char *tbl_name);
Java: void TableCreate(String tbl_name) ;
(import rss.Rsst4j;)
VB: Sub TableCreate(tbl_name As String)
(Class Rsso)
Create a new table based on the specified table name.
rsst: point to the Rsst to be used.
tbl_name: the table name.
C: void RsstTableSave(Rsst
*rsst, int col_num, int row_num, int start_row);
Java: void TableSave(int col_num, int row_num,
int start_row); (import rss.Rsst4j;)
VB: Sub TableSave(col_num As Long, row_num
As Long, start_row As Long) (Class Rsso)
Close current table. You must close the table when you create a new
table.
rsst: point to the Rsst to be used.
col_num: the total number of columns of the current table.
row_num: the total number of rows of the current table.
start_row: the sequence number of the start row of the current table
(the default value is 1).
C: void RsstTableOpen(Rsst
*rsst, char *tbl_name);
Java: void TableOpen(String tbl_name) ;
(import rss.Rsst4j;)
VB: Sub TableOpen(tbl_name As String)
(Class Rsso)
Open an existing table according to the specified table name.
rsst: point to the Rsst to be used.
tbl_name: the table name.
C: int RsstTableGetColNum(Rsst
*rsst);
Java: int TableGetColNum(); (import
rss.Rsst4j;)
VB: Property TableColNum As Long
read-only (Class Rsso)
Get the total number of columns of the current table.
rsst: point to the Rsst to be used.
Return value: the total number of columns of the current table.
C: int RsstTableGetRowNum(Rsst
*rsst);
Java: int TableGetRowNum(); (import
rss.Rsst4j;)
VB: Property TableRowNum As Long
read-only (Class Rsso)
Get the total number of rows of the current table.
rsst: point to the Rsst to be used.
Return value: the total number of rows of the current table.
C: int RsstTableGetStartRow(Rsst
*rsst);
Java: int TableGetStartRow(); (import
rss.Rsst4j;)
VB: Property TableStartRow As Long
read-only (Class Rsso)
Get the sequence number of the start row of the current table.
rsst: point to the Rsst to be used.
Return value: the sequence number of the start row of the current table.
C: void RsstTableFetchRow(Rsst
*rsst, int row);
Java: void TableFetchRow(int row) ;
(import rss.Rsst4j;)
VB: Sub TableFetchRow(Row As Long)
(Class Rsso)
Fetch the data in the columns of a specified row of the current table
into the current array.
rsst: point to the Rsst to be used.
row: the sequence number of the specified row.
C: void RsstTableNewRow(Rsst
*rsst);
Java: void TableNewRow(); (import rss.Rsst4j;)
VB: Sub TableNewRow() (Class Rsso)
Create an empty Array. It is the same as RsstArrayNew.
rsst: point to the Rsst to be used.
C: void RsstTableSaveRow(Rsst
*rsst, int row);
Java: void TableSaveRow(int row) ; (import
rss.Rsst4j;)
VB: Sub TableSaveRow(row As Long)
(Class Rsso)
Save the current array to the specified row of the table.
rsst: point to the Rsst to be used.
row: the sequence number of the specified row.
C: ChrPtr RsstTableGet
(Rsst *rsst, int col);
C: char *RsstTableGet0(Rsst
*rsst, int col);
Java: byte[] TableGet(int col) ;
(import rss.Rsst4j;)
VB: Property Table(Col As Long)
(Class Rsso)
Get the the value from the specified column(item) of current Array.
It is the same as function "*ArrayGet*".
rsst: point to the Rsst to be used.
col: the sequence number of the specified column(item) (start from
one)
Return value: A pointer which points to the data value of the specified
item of current Array. There must be a null character at the end of the
data when you use function RsstTableGet0. Save the value after using RsstTableGet0
because next RSSF may change the data pointed by this pointer. An empty
string ("") will be returned if there's something wrong, and you can use
RsstGetInternalReturnCode to get the return code according to the macros
"RSS_RT_*" in rss.h.
C: void RsstTablePut(Rsst
*rsst, char *value, int len, int col);
C: void RsstTablePut0(Rsst
*rsst, char *value, int col);
Java: void TablePut(byte[] value, int col);
(import rss.Rsst4j;)
Java: void TablePut(String value, int col);
(import rss.Rsst4j;)
VB: Property Table(Col As Long)
(Class Rsso)
Put the the value into the specified column(item) of current Array.
It is the same as function "*ArrayPut*".
rsst: point to the Rsst to be used.
value: point to the data value of the key. There must be a null character
at the end in function RsstTablePut0.
len: the length of the data value.
col: the sequence number of the specified column(item) (start from
one)
C: int RsstTableGetInteger(Rsst
*rsst, int col);
Java: int TableGetInteger(int col) ;
(import rss.Rsst4j;)
VB: Property TableInteger(Col As Long)
As Long (Class Rsso)
Get the the integer value from the specified column(item) of current
Array. It is the same as function "*ArrayGet*".
rsst: point to the Rsst to be used.
col: the sequence number of the specified column(item) (start from
one)
Return value: the integer value according to the specified column(item)
of current Array. Zero will be returned if there's something wrong,
and you can use RsstGetInternalReturnCode to get the return code according
to the macros "RSS_RT_*" in rss.h.
C: void RsstTablePutInteger(Rsst
*rsst, long value, int col);
Java: void TablePutInteger(int value, int
col); (import rss.Rsst4j;)
VB: Property TableInteger(Col As Long)
As Long (Class Rsso)
Put the the integer value into the specified column(item) of current
Array. It is the same as function "*ArrayPut*".
rsst: point to the Rsst to be used.
value: the integer data value of the column(item).
col: the sequence number of the specified column(item) (start from
one)
7. RSSI functions.
C: int Locate(Rsst *rsst,
char *DllPath, char *FuncName);
VB: Function Locate(DllPath As String,
FuncName As String) As Long (Class Rsso)
Locate and load the dynamic library and RSSI entry which provide RSSI
service.
rsst: point to the Rsst to be used.
DllPath: the path of the dynamic library.
FuncName: the name of the RSSI entry.
Return value: non zero indicates there's something wrong with the function.
C: void Unlocate(Rsst *rsst);
Release the dynamic library and RSSI entry which provide RSSI service.
rsst: point to the Rsst to be used.
Java: void CallRssi(byte[] Action);
(import rss.Rsst4j;)
VB: Sub CallRssi(Action As String)
(Class Rsso)
The standard RSSI only has one exported function as its entry, which
has two arguments and no return value. For example, a C RSSI entry named
"MyRssi" will be declared in following forms:
For C:
RSSI_DLL_EXPORT void MyRssi(Rsst *rsst, char *act);
A Java RSSI service must implements rss.Rsso including 2 methods as follows:
public void Rssi(int rsst, byte[] Action);
public void Rssi(Rsst4j rsst, String Action);
A VB (or COM) RSSI entry named "MyRssi" will be declared in following forms:
Public Sub MyRssi(rsst As Long, action As String)
You can invoke RSSI service in client applications with convenient functions
"CallRssi".
Action: the Action name.
C: void StringFitIn(char
*str, char *str0, int len);
Copy string with a length limitation.
str: point to the string to be copied to.
str0: point to the string to be copied from.
len: the maximum length of bytes to be copied.
VB: Function ToStr(Value As Variant)
As String (Class Rsso)
"ToStr" is more like the Visual Basic function "StrConv", which will
translate a byte array to a Unicode string. In a language supporting COM,
such as Visual Basic, the input argument as a value of key or the RSS is
always defined as type VARIANT. The real internal type must be a byte array
or BStr (a Unicode String). The return value as a value of key or the RSS
is always defined as type VARIANT, too. But the real internal type is always
a byte array. If you want to change the byte array into a Unicode string,
you can use convenient function "ToStr" or Visual Basic function "StrConv".
Value: the data to translated.
Return value: the translated Unicode string.