class OmInputDevice

Low level input handling for the Standard OpenMath protocol. More...

Definition#include <OmInputDevice.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

Low level input handling for the Standard OpenMath protocol.

This class provides a basic light encapsulation of the C library, concerning the input operations. The built-in types in use are strongly compatible with those used in the C library. This layer can be used independently from the object-oriented approach provided by the OmNode hierarchy, and it may be more simple to integrate it in C++ code than directly calling the C library. Any call to readX() may throw an exception, which should be caught as an OmException & object. All readX() methods return the current (this) input device.

OmInputDevice & readType (OmType & type_out)
[virtual]

Read the type of the current available token.

OmInputDevice & readLength (unsigned int & length_out)
[virtual]

Read the length of the current available token, if applicable.

OmInputDevice & readSymbolLength (unsigned int & cdLength_out, unsigned int & nameLength_out)
[virtual]

Read the length of the current available Symbol token, if applicable.

OmInputDevice & readInteger (int & value_out)
[virtual]

Read a built-in 32-bits signed integer value.

OmInputDevice & readBigInteger (char * digits_in, unsigned int length_in, int & sign_out, unsigned int & base_out)
[virtual]

Read a big integer number.

OmInputDevice & readFloat (double & value_out)
[virtual]

Read a built-in 64bits float value.

OmInputDevice & readByteArray (char * buffer_in, unsigned int length_in)
[virtual]

Read a byte array.

OmInputDevice & readString (char * buffer_in, unsigned int length_in)
[virtual]

Read a zero-terminated C string of 8 bits characters.

OmInputDevice & readWString (wchar_t * buffer_in, unsigned int length_in)
[virtual]

Read a zero-terminated C string of wide characters.

OmInputDevice & readVariable (char * name_in, unsigned int length_in)
[virtual]

Read a variable as a zero-terminated C string of characters.

OmInputDevice & readSymbol (char * cd_in, unsigned int cdLength_in, char * name_in, unsigned int nameLength_in)
[virtual]

Read a symbol as a couple (cd, name) of two zero-terminated strings of characters.

OmInputDevice & readApplication ()
[virtual]

Read an application begin tag.

OmInputDevice & readEndApplication ()
[virtual]

Read an application end tag.

OmInputDevice & readAttribute ()
[virtual]

Read an attribute begin tag.

OmInputDevice & readEndAttribute ()
[virtual]

Read an attribute end tag.

OmInputDevice & readAttributeParameter ()
[virtual]

Read an attribute parameter begin tag.

OmInputDevice & readEndAttributeParameter ()
[virtual]

Read an attribute parameter end tag.

OmInputDevice & readBinding ()
[virtual]

Read a binding begin tag.

OmInputDevice & readEndBinding ()
[virtual]

Read a binding end tag.

OmInputDevice & readBindingVariable ()
[virtual]

Read a binding variable begin tag.

OmInputDevice & readEndBindingVariable ()
[virtual]

Read a binding variable end tag.

OmInputDevice & readObject ()
[virtual]

Read an object begin tag.

OmInputDevice & readEndObject ()
[virtual]

Read an object end tag.

OmInputDevice & readError ()
[virtual]

Read an error begin tag.

OmInputDevice & readEndError ()
[virtual]

Read an error end tag.

OmInputDevice & readPInstruction (char * buffer_in, unsigned int length_in)
[virtual]

Read a processing instruction.

OmInputDevice & readComment (char * buffer_in, unsigned int length_in)
[virtual]

Read a comment.

OmInputDevice (OmInputStream & stream_in, OmEncoding encoding_in, bool ignoreComment_in=true)

Constructor. The input stream and the encoding must be given in arguments, they cannot change later. Also it is strongly recommended not to share an input stream with another input device (undefined behavior).

~OmInputDevice ()
[virtual]

Destructor.

OmEncoding getEncoding ()
[const virtual]

Get the encoding.


Generated by: root@localhost.localdomain on Tue Oct 12 21:02:30 199.