Arxx Namespace Reference


Detailed Description

The Arxx namespace which contains all the C++ classes you need to work with ARX archives.

libarxx - Advanced Resource files in C++ Copyright (C) 2005 Hagen Möbius

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Classes

class  ArchiveHeader
 The representation of an archive's header in a file. More...
class  ItemHeader
 The memory representation of a single item. More...
class  DefaultItemFactory
 The standard ItemFactory created by every library that has no other ItemFactory set. More...
class  LocalArchiveChannel
 An class to fetch data from a local ARX archive file. More...
class  ReferenceImplementation
 The real Arxx::Item reference used by Arxx::Reference to implement shared references. More...
class  Archive
 The Arxx::Archive class is a container for an arbitrary amount of Arxx::Item objects. More...
class  Buffer
 The core class of the Buffer. More...
class  BufferReader
 Implements a convenient output interface for Arxx::Buffer. More...
class  BufferWriter
 Implements a convenient input interface for Arxx::Buffer. More...
class  id_not_unique
 An exception class indicating that a given ID is not unique. More...
class  zlib_error
 An exception class indicating that the zlib library reports an error. More...
class  bzlib_error
 An exception class indicating that the bzlib library reports an error. More...
class  bad_file_format
 An exception class indicating an invalid file format in an ARX archive. More...
class  file_error
 An exception class indicating that an error occured while reading or writing from or to a file. More...
class  Data
 A buffer with compression, decompression and external data referencing features. More...
class  DataChannel
 An abstract class defining the interface for data sources. More...
class  DataRepository
 This class is a global player helping Arxx::Item and Arxx::Archive objectst to fetch their data. More...
class  Item
 The Arxx::Item is the basic class for any data storaging. More...
class  ItemFactory
 An abstract definition of an item factory. More...
class  Context
 Gathers information about a merging process. More...
class  Rule
 A class representing a matching rule in the merging process. More...
class  Reference
 Instances of this class represent items either by unique ID or if known by pointer. More...
class  Structure
 The structure of a ARX archive is saved inside these objects. More...
class  URI
 A URI class. More...

Typedefs

typedef u_int32_t u4byte
 A type that should always be mapped to an unsigned 4 byte-long value.
typedef u_int8_t u1byte
 A type that should always be mapped to an unsigned 1 byte-long value.

Enumerations

enum  FetchStatus {
  FETCHED = 0, UNFETCHED = 1, CONNECTING = 2, LOGGINGIN = 3,
  LOGGINGOUT = 4, DISCONNECTING = 5, TRANSFERING = 6, REQUESTING = 7,
  HOSTUNREACHABLE = 8, LOGINNOTALLOWED = 9, SERVICEUNAVAILABLE = 10, DATANOTFOUND = 11,
  FETCHING = 12, RESOLVINGHOST = 13, SYSTEMERROR = 14
}
enum  Action { ADD, REPLACE, DROP, PASS }
 Enumeration of the possible actions a rule can induce. More...

Functions

std::ostream & operator<< (std::ostream &OStream, Arxx::ArchiveHeader &ArchiveHeader)
 The output operator for a Arxx::LibraryHeader struct.
std::ostream & operator<< (std::ostream &OStream, Arxx::ItemHeader &ItemHeader)
 The output operator for a Arxx::ItemHeaderV1000 struct.
std::istream & operator>> (std::istream &IStream, Arxx::ArchiveHeader &ArchiveHeader)
 The input operator for a Arxx::LibraryHeader struct.
std::istream & operator>> (std::istream &IStream, Arxx::ItemHeader &ItemHeader)
 The input operator for a Arxx::ItemHeaderV1000 struct.
std::ostream & operator<< (std::ostream &OStream, const Arxx::Buffer &Buffer)
 An output operator for std::ostream which uses the Buffers::Buffer::Ouput function.
Arxx::BufferReaderoperator>> (Arxx::BufferReader &BufferReader, std::string &sString)
 A helper function for reading a string from a buffer.
Arxx::BufferReaderoperator>> (Arxx::BufferReader &BufferReader, float &fValue)
 A helper function for reading float values from a buffer.
Arxx::BufferReaderoperator>> (Arxx::BufferReader &BufferReader, Arxx::u4byte &u4Value)
 A helper function for reading u4byte values from a buffer.
Arxx::BufferReaderoperator>> (Arxx::BufferReader &BufferReader, bool &bValue)
 A helper function for reading bool objects from a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const std::string &sString)
 A helper function for storing a std::string instance in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const char *pcString)
 A helper function for storing a C string in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const float &fValue)
 A helper function for storing float numbers in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const Arxx::u4byte &u4Value)
 A helper function for storing Arxx::u4byte objects in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const bool &bValue)
 A helper function for storing bool objects in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const char &cValue)
 A helper function for storing char objects in a buffer.
Arxx::BufferWriteroperator<< (Arxx::BufferWriter &BufferWriter, const std::pair< Arxx::Buffer::size_type, std::istream * > &Stream)
 A helper function that allows filling a buffer from an std::istream.
Arxx::Bufferoperator<< (Arxx::Buffer &Buffer, const Arxx::Structure &Structure)
 Convenience function that streams the structural information into a Arxx::Buffer.
std::ostream & operator<< (std::ostream &OStream, const Arxx::URI &URI)

Variables

const u4byte g_u4InvalidID = 0xFFFFFFFF
 A libarxx wide constant that always stands for invalid or not specified unique or non-unique IDs.
DataRepository Repository


Typedef Documentation

typedef u_int32_t Arxx::u4byte

A type that should always be mapped to an unsigned 4 byte-long value.

If your architecture trips here, email the AUTHOR.

typedef u_int8_t Arxx::u1byte

A type that should always be mapped to an unsigned 1 byte-long value.

If your architecture trips here, email the AUTHOR.


Enumeration Type Documentation

enum Arxx::FetchStatus

Enumerator:
FETCHED 
UNFETCHED 
CONNECTING 
LOGGINGIN 
LOGGINGOUT 
DISCONNECTING 
TRANSFERING 
REQUESTING 
HOSTUNREACHABLE 
LOGINNOTALLOWED 
SERVICEUNAVAILABLE 
DATANOTFOUND 
FETCHING 
RESOLVINGHOST 
SYSTEMERROR 

enum Arxx::Action

Enumeration of the possible actions a rule can induce.

Whenever a Arxx::Rule is matched during a merging process the rule's Arxx::Rule::bMatch() function will be called to determine the action theat is to be taken. The result of that function should be one of the values:

Enumerator:
ADD  Signifies that the current item is to be added to the target Archive.

The item will be unregistered from the source library and appended to the Arxx::Context::m_AddingItems vector so it can be registered at the target library after all matchings have been performed.

REPLACE  Replace the item with the same ID in the target Archive.

The item that is to be replaced in the target librarywill be unregistered via Arxx::Archive::vUnregisterItem and the current item will be registered in the taget library.

DROP 
PASS 


Function Documentation

std::ostream& Arxx::operator<< ( std::ostream &  OStream,
Arxx::ArchiveHeader ArchiveHeader 
) [inline]

The output operator for a Arxx::LibraryHeader struct.

This function takes care of the correct output of a LibraryHeader to any kind of std::ostream.

std::ostream& Arxx::operator<< ( std::ostream &  OStream,
Arxx::ItemHeader ItemHeader 
) [inline]

The output operator for a Arxx::ItemHeaderV1000 struct.

This function takes care of the correct output of a ItemHeaderV1000 to any kind of std::ostream.

std::istream& Arxx::operator>> ( std::istream &  IStream,
Arxx::ArchiveHeader ArchiveHeader 
) [inline]

The input operator for a Arxx::LibraryHeader struct.

This function takes care of the correct reading of a LibraryHeader from any kind of std::istream.

std::istream& Arxx::operator>> ( std::istream &  IStream,
Arxx::ItemHeader ItemHeader 
) [inline]

The input operator for a Arxx::ItemHeaderV1000 struct.

This function takes care of the correct reading of a ItemHeaderV1000 from any kind of std::istream.

std::ostream & Arxx::operator<< ( std::ostream &  OStream,
const Arxx::Buffer Buffer 
)

An output operator for std::ostream which uses the Buffers::Buffer::Ouput function.

This operator is implemented for your convinience and allows you to write:

 std::cout << Buffer;
or any other std::ostream object. Remember that the data inside the buffer may be binary and thus is not meant to be pushed to std::cout.

Arxx::BufferReader & Arxx::operator>> ( Arxx::BufferReader BufferReader,
std::string &  sString 
)

A helper function for reading a string from a buffer.

Parameters:
BufferReader The BufferReader from which the string will be read.
sString A std::string which will be filled with the string from the buffer.
This helper function reads a string from the buffer Buffer. Although this function does not use Buffers::Buffer::vWriteBack() it will set the buffer's I/O position to the first position after the trailing zero.

Note:
The string inside the buffer has to be in a zero-terminated form. This function will read until it finds the first zero in the buffer so that the string itself may not contain a zero.

Arxx::BufferReader & Arxx::operator>> ( Arxx::BufferReader BufferReader,
float &  fValue 
)

A helper function for reading float values from a buffer.

Parameters:
BufferReader The BufferReader from which the float value will be read.
fValue The target for the float value that is to be read.
Returns:
The Buffer after the output execution.
This function reads a float value from the buffer storing it in fValue .

Arxx::BufferReader & Arxx::operator>> ( Arxx::BufferReader BufferReader,
Arxx::u4byte u4Value 
)

A helper function for reading u4byte values from a buffer.

Parameters:
BufferReader The BufferReader from which the u4byte value will be read.
u4Value The target for the u4byte value that is to be read.
Returns:
The Buffer after the output execution.
This function reads a float value from the buffer storing it in u4Value .

Arxx::BufferReader & Arxx::operator>> ( Arxx::BufferReader BufferReader,
bool &  bValue 
)

A helper function for reading bool objects from a buffer.

Parameters:
BufferReader The BufferReader from which the bool will be read.
bValue The target for the bool value that is to be read.
Returns:
The Buffer after the output execution.
This function reads the bool value bValue from the buffer using an output function.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const std::string &  sString 
)

A helper function for storing a std::string instance in a buffer.

Parameters:
BufferWriter The buffer in which the string will be stored.
sString The string which is about to be stored.
Returns:
The BufferWriter after the input execution.
This helper function stores the std::string sString in the buffer Buffer. It uses the Buffers::Buffer::vInput function so that the buffer current I/O position will be used as the insertion position. Therefore also the overwrite state of the buffer will be adhered. Afterwards the I/O position will be set to the end of the insertion by Buffer::Buffer::vInput().

Note:
The string will be stored as a zero-terminated string so that a trailing zero will be appended.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const char *  pcString 
)

A helper function for storing a C string in a buffer.

Parameters:
BufferWriter The buffer in which the C string will be stored.
pcString The C string which is about to be stored.
Returns:
The BufferWriter after the input execution.
This helper function stores the C string pcString in the buffer Buffer.

The function uses strlen(3) to determine the length of the string.

Note:
The string will be stored as a zero-terminated string so that a trailing zero will be appended.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const float &  fValue 
)

A helper function for storing float numbers in a buffer.

Parameters:
BufferWriter The buffer in which the float number will be stored.
fValue The float value which is to be stored.
Returns:
The BufferWriter after the input execution.
This function stores the float value fValue in the buffer using an input function.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const Arxx::u4byte u4Value 
)

A helper function for storing Arxx::u4byte objects in a buffer.

Parameters:
BufferWriter The buffer in which the Arxx::u4byte will be stored.
u4Value The Arxx::u4byte value which is to be stored.
Returns:
The BufferWriter after the input execution.
This function stores the Arxx::u4byte value u4Value in the buffer using an input function.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const bool &  bValue 
)

A helper function for storing bool objects in a buffer.

Parameters:
BufferWriter The buffer in which the bool will be stored.
bValue The bool value which is to be stored.
Returns:
The BufferWriter after the input execution.
This function stores the bool value bValue in the buffer using an input function.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const char &  cValue 
)

A helper function for storing char objects in a buffer.

Parameters:
BufferWriter The buffer in which the bool will be stored.
cValue The char value which is to be stored.
Returns:
The BufferWriter after the input execution.
This function stores the char value cValue in the buffer using an input function.

Arxx::BufferWriter & Arxx::operator<< ( Arxx::BufferWriter BufferWriter,
const std::pair< Arxx::Buffer::size_type, std::istream * > &  Stream 
)

A helper function that allows filling a buffer from an std::istream.

Parameters:
BufferWriter The buffer which will be filled from the content of the istream.
Stream A std::pair which's first component describes the amount of bytes to be read from the stream specified in its second component.
Returns:
The BufferWriter after the input execution.
This function will append the stream content at the I/O position of the buffer. It will read Stream.first bytes from the stream. In case the stream end before that amount of bytes the buffer will contain only as much bytes as could be read from the stream. This function is an I/O operation and thus will modify the I/O position of the buffer to point after the last byte read.

Arxx::Buffer & Arxx::operator<< ( Arxx::Buffer Buffer,
const Arxx::Structure Structure 
)

Convenience function that streams the structural information into a Arxx::Buffer.

std::ostream & Arxx::operator<< ( std::ostream &  OStream,
const Arxx::URI URI 
)


Variable Documentation

const u4byte Arxx::g_u4InvalidID = 0xFFFFFFFF

A libarxx wide constant that always stands for invalid or not specified unique or non-unique IDs.

This value mainly serves as a return value. If you call a function that returns an Item's unique ID this value is sematically the same as if the Arxx::Item pointer was returned with 0.

Arxx::DataRepository Arxx::Repository

libarxx - Advanced Resource files in C++ Copyright (C) 2005 Hagen Möbius

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Generated on Tue Oct 10 11:34:36 2006 for libarxx by  doxygen 1.4.7