imebra  build 2011-09-18_22-24-41
Base classes

Classes

class  puntoexe::ptr< objectType >
 This class represents a shared pointer which keeps track of the allocated objects that derive from the class baseObject. More...
class  puntoexe::baseObject
 This is the base class of the library. Almost all the classes in the library are derived from this one. More...
class  puntoexe::lockObject
 Locks the access to an object of type baseObject. More...
class  puntoexe::lockMultipleObjects
 Locks the access to several objects of type baseObject. More...
class  puntoexe::baseStream
 This class represents a stream. More...
class  puntoexe::streamException
 The base exception for all the exceptions thrown by the function in baseStream. More...
class  puntoexe::streamExceptionOpen
 Exception thrown when the stream cannot be open. More...
class  puntoexe::streamExceptionRead
 Exception thrown when there is an error during the read phase. More...
class  puntoexe::streamExceptionWrite
 Exception thrown when there is an error during the write phase. More...
class  puntoexe::streamExceptionClose
 Exception thrown when there are problems during the closure of the stream. More...
class  puntoexe::charsetConversionException
 Base class for the exceptions thrown by charsetConversion. More...
class  puntoexe::charsetConversionExceptionNoTable
 Exception thrown when the requested charset is not supported by the DICOM standard. More...
class  puntoexe::charsetConversionExceptionNoSupportedTable
 Exception thrown when the requested charset is not supported by the system. More...
class  puntoexe::charsetConversionExceptionUtfSizeNotSupported
 Exception thrown when the system doesn't have a supported size for wchar_t. More...
class  puntoexe::criticalSection
 This class represents a critical section. More...
class  puntoexe::lockCriticalSection
 This class locks a critical section in the constructor and unlocks it in the destructor. More...
class  puntoexe::exceptionInfo
 This class is used to store the information related to the points where the exceptions are being caught&thrown. More...
class  puntoexe::exceptionsManager
 One statically allocated instance of this class logs the stack positions while an exception is being processed. More...
class  puntoexe::huffmanTable
 This class calculates the huffman table from a set of values and their frequency, and can read or write huffman codes from/to a baseStream object. More...
class  puntoexe::memory
 This class is used to supply a reference counter to a string of bytes. More...
class  puntoexe::memoryPool
 Stores unused memory objects (see puntoexe::memory) so they can be reused when needed. More...
class  puntoexe::memoryStream
 This class derives from the baseStream class and implements a memory stream. More...
class  puntoexe::nullStream
 This class derives from the baseStream class and implements a null stream. More...
class  puntoexe::stream
 This class derives from the baseStream class and implements a file stream. More...
class  puntoexe::streamController
 This class represents a stream controller. A stream controller can read or write data from/to a stream. More...
class  puntoexe::streamExceptionEOF
 Exception thrown when an attempt to read past the end of the file is made. More...
class  puntoexe::streamJpegTagInStream
 Exception thrown when a jpeg tag is found but wasn't expected. More...
class  puntoexe::streamReader
 Represents a stream reader. A stream reader can read data from a stream. Several stream readers can share a single baseStream derived object. More...
class  puntoexe::streamWriter
 Use this class to write into a baseStream derived class. More...
class  puntoexe::thread
 This class represents a thread. More...
class  puntoexe::threadException
 This is used as the base class for the exceptions thrown by the class thread. More...
class  puntoexe::threadExceptionAlreadyRunning
 Exception thrown by thread when an attempt to run an already running thread is made. More...

Defines

#define PUNTOEXE_FUNCTION_START(functionName)
 Initialize a try block. The try block must be matched by a call to the PUNTOEXE_FUNCTION_END() macro.
#define PUNTOEXE_FUNCTION_END()
 Insert a catch block that rethrows the catched exception and log the function's name and the position in the source file in which the exception has been catched and rethrown.
#define PUNTOEXE_THROW(exceptionType, what)
 Throw an exception of the specified type and log the function's name and the position in the file on which the exception has been thrown.
#define PUNTOEXE_RETHROW(what)
 Rethrow an exception caught by a catch block and add some descriptions to it.

Typedefs

typedef unsigned char imbxUint8
 This type represents a 1 byte unsigned integer.
typedef unsigned short imbxUint16
 This type represents a 2 bytes unsigned integer.
typedef unsigned int imbxUint32
 This type represents a 4 bytes unsigned integer.
typedef signed char imbxInt8
 This type represents an 1 byte signed integer.
typedef signed short imbxInt16
 This type represents a 2 bytes signed integer.
typedef signed int imbxInt32
 This type represents a 4 bytes signed integer.

Detailed Description

The base classes supply basic services like streams, memory management and exceptions management.

They also implement the smart pointer puntoexe::ptr and the base class puntoexe::baseObject


Define Documentation

#define PUNTOEXE_FUNCTION_END ( )
Value:
}\
        catch(std::exception& e)\
        {\
                puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, __LINE__, typeid(e).name(), e.what());\
		puntoexe::exceptionsManager::addExceptionInfo(info);\
                throw;\
        }\
        catch(...)\
        {\
                puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, __LINE__, "unknown", "");\
		puntoexe::exceptionsManager::addExceptionInfo(info);\
                throw;\
        }

Insert a catch block that rethrows the catched exception and log the function's name and the position in the source file in which the exception has been catched and rethrown.

This function must be placed at the end of a function if the PUNTOEXE_FUNCTION_START() has been used in the function.

#define PUNTOEXE_FUNCTION_START (   functionName)
Value:
static const wchar_t* _puntoexe_function_name = functionName;\
        try{

Initialize a try block. The try block must be matched by a call to the PUNTOEXE_FUNCTION_END() macro.

This macro should be placed at the very beginning of a function.

All the exceptions not catched by the body of the function are catched by PUNTOEXE_FUNCTION_END() and rethrown, but before being rethrown the function's name and the line number in the source file are logged. All the positions of the PUNTOEXE_FUNCTION_END() that catch the same exception are logged togheter.

Exceptions thrown inside the function should be thrown by PUNTOEXE_THROW(), but this is not necessary.

Parameters:
functionNamethe name of the function in which the macro is placed.
#define PUNTOEXE_RETHROW (   what)
Value:
{\
                puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, __LINE__, "rethrowing", what);\
		puntoexe::exceptionsManager::addExceptionInfo(info);\
                throw;\
        }

Rethrow an exception caught by a catch block and add some descriptions to it.

This macro can be used only in the functions or blocks that use the macros PUNTOEXE_FUNCTION_START() and PUNTOEXE_FUNCTION_END().

Parameters:
whata message to be associated with the exception
#define PUNTOEXE_THROW (   exceptionType,
  what 
)
Value:
{\
                exceptionType e(what);\
                puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, __LINE__, typeid(e).name(), what);\
		puntoexe::exceptionsManager::addExceptionInfo(info);\
                throw e;\
        }

Throw an exception of the specified type and log the function's name and the position in the file on which the exception has been thrown.

This macro can be used only in the functions or blocks that use the macros PUNTOEXE_FUNCTION_START() and PUNTOEXE_FUNCTION_END().

Parameters:
exceptionTypethe type of exception to throw
whata message to be associated with the exception

Typedef Documentation

typedef signed short imbxInt16

This type represents a 2 bytes signed integer.

typedef signed int imbxInt32

This type represents a 4 bytes signed integer.

typedef signed char imbxInt8

This type represents an 1 byte signed integer.

typedef unsigned short imbxUint16

This type represents a 2 bytes unsigned integer.

typedef unsigned int imbxUint32

This type represents a 4 bytes unsigned integer.

typedef unsigned char imbxUint8

This type represents a 1 byte unsigned integer.