D Programming Language 2.0

- Comments
- D
- Search
- Home

Last update Tue Oct 16 09:58:56 2007

# std.openrj

Open-RJ mapping for the D standard library.
Authors:
Matthew Wilson
References:
Open-RJ

enum ORJ_FLAG;
  Flags that moderate the creation of Databases
  ORDER_FIELDS
    Arranges the fields in alphabetical order
  ELIDE_BLANK_RECORDS
    Causes blank records to be ignored
invariant(char)[] toString(ORJ_FLAG f);
enum ORJRC;
  General error codes
  SUCCESS
    Operation was successful
  CANNOT_OPEN_JAR_FILE
    The given file does not exist, or cannot be accessed
  NO_RECORDS
    The database file contained no records
  OUT_OF_MEMORY
    The API suffered memory exhaustion
  BAD_FILE_READ
    A read operation failed
  PARSE_ERROR
    Parsing of the database file failed due to a syntax error
  INVALID_INDEX
    An invalid index was specified
  UNEXPECTED
    An unexpected condition was encountered
  INVALID_CONTENT
    The database file contained invalid content
invariant(char)[] toString(ORJRC f);
enum ORJ_PARSE_ERROR;
  Parsing error codes
  SUCCESS
    Parsing was successful
  RECORD_SEPARATOR_IN_CONTINUATION
    A record separator was encountered during a content line continuation
  UNFINISHED_LINE
    The last line in the database was not terminated by a line-feed
  UNFINISHED_FIELD
    The last field in the database file was not terminated by a record separator
  UNFINISHED_RECORD
    The last record in the database file was not terminated by a record separator
invariant(char)[] toString(ORJ_PARSE_ERROR f);
class OpenRJException: object.Exception;
class DatabaseException: std.openrj.OpenRJException;
  ORJRC rc();
  ORJ_PARSE_ERROR parseError();
  int lineNum();
class InvalidKeyException: std.openrj.OpenRJException;
class InvalidTypeException: std.openrj.OpenRJException;
class Field;
  Represents a field in the database
  final invariant(char)[] name();
  final invariant(char)[] value();
  Record record();
class Record;
  Represents a record in the database, consisting of a set of fields
  uint numFields();
  uint length();
  Field[] fields();
  Field opIndex(uint index);
  invariant(char)[] opIndex(invariant(char)[] fieldName);
  Field getField(invariant(char)[] fieldName);
  Field findField(invariant(char)[] fieldName);
  int hasField(invariant(char)[] fieldName);
  Database database();
  int opApply(int delegate(ref Field field) dg);
  int opApply(int delegate(in invariant(char)[] name, in invariant(char)[] value) dg);
class Database;
  this(invariant(char)[] memory, uint flags);
  this(invariant(char)[][] lines, uint flags);
  uint numRecords();
  uint numFields();
  uint numLines();
  uint flags();
  Record[] records();
  Field[] fields();
  uint length();
  Record opIndex(uint index);
  Record[] getRecordsContainingField(invariant(char)[] fieldName);
  Record[] getRecordsContainingField(invariant(char)[] fieldName, invariant(char)[] fieldValue);
  int opApply(int delegate(ref Record record) dg);
  int opApply(int delegate(ref Field field) dg);

Copyright © 1999-2007 by Digital Mars, All Rights Reserved | Page generated by Ddoc.