std.openrj
Open-RJ mapping for the D standard library.
Authors:
Matthew Wilson
References:
Open-RJ
Variables
static
VERSION
: Version
Enums
ORJ_FLAG
:
int
Flags that moderate the creation of Databases
ELIDE_BLANK_RECORDS
Causes blank records to be ignored
ORDER_FIELDS
Arranges the fields in alphabetical order
ORJ_PARSE_ERROR
:
int
Parsing error codes
RECORD_SEPARATOR_IN_CONTINUATION
A record separator was encountered during a content line continuation
SUCCESS
Parsing was successful
UNFINISHED_FIELD
The last field in the database file was not terminated by a record separator
UNFINISHED_LINE
The last line in the database was not terminated by a line-feed
UNFINISHED_RECORD
The last record in the database file was not terminated by a record separator
ORJRC
:
int
General error codes
BAD_FILE_READ
A read operation failed
CANNOT_OPEN_JAR_FILE
The given file does not exist, or cannot be accessed
INVALID_CONTENT
The database file contained invalid content
INVALID_INDEX
An invalid index was specified
NO_RECORDS
The database file contained no records
OUT_OF_MEMORY
The API suffered memory exhaustion
PARSE_ERROR
Parsing of the database file failed due to a syntax error
SUCCESS
Operation was successful
UNEXPECTED
An unexpected condition was encountered
Functions
char
[]
toString
(
ORJ_FLAG
f
)
Classes
Database
:
Object
Super hierarchy:
Object
->
Database
Constructors
this
(
char
[]
memory
,
uint
flags
)
Methods
Field
[]
fields
()
uint
flags
()
Record
[]
getRecordsContainingField
(
char
[]
fieldName
)
uint
length
()
uint
numFields
()
uint
numLines
()
uint
numRecords
()
int
opApply
(
int
delegate
(
Record
)
dg
)
Record
opIndex
(
uint
index
)
Record
[]
records
()
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
Aliases
difference_type
:
ptrdiff_t
index_type
:
size_t
size_type
:
size_t
DatabaseException
:
OpenRJException
Super hierarchy:
Object
->
Exception
->
OpenRJException
->
DatabaseException
Methods
int
lineNum
()
ORJ_PARSE_ERROR
parseError
()
ORJRC
rc
()
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString
Field
:
Object
Represents a field in the database
Super hierarchy:
Object
->
Field
Methods
final
char
[]
name
()
Record
record
()
final
char
[]
value
()
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
InvalidKeyException
:
OpenRJException
Super hierarchy:
Object
->
Exception
->
OpenRJException
->
InvalidKeyException
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString
InvalidTypeException
:
OpenRJException
Super hierarchy:
Object
->
Exception
->
OpenRJException
->
InvalidTypeException
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString
OpenRJException
:
Exception
Super hierarchy:
Object
->
Exception
->
OpenRJException
Direct known subclasses:
DatabaseException
,
InvalidKeyException
,
InvalidTypeException
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString
Record
:
Object
Represents a record in the database, consisting of a set of fields
Super hierarchy:
Object
->
Record
Methods
Database
database
()
Field
[]
fields
()
Field
findField
(
char
[]
fieldName
)
Field
getField
(
char
[]
fieldName
)
int
hasField
(
char
[]
fieldName
)
uint
length
()
uint
numFields
()
int
opApply
(
int
delegate
(
Field
)
dg
)
Field
opIndex
(
uint
index
)
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
Aliases
difference_type
:
ptrdiff_t
index_type
:
size_t
size_type
:
size_t
Templates
enum_to_string(T)
Methods
char
[]
enum_to_string
(EnumString[]
strings
,
void
t
)