gpucalc::ExceptionFactory Class Reference

Class implementing dispatch methods in order to construct by-value exceptions of a derived type based just on an exception code. More...

#include <exception.h>

List of all members.

Static Public Member Functions

static ValueNotDeletedException create (Int2Type< ERR_VALUE_NOT_DELETED_ERROR > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static SourceCompilationException create (Int2Type< ERR_SOURCE_COMPILATION_ERROR > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static RuntimeAssertionException create (Int2Type< ERR_RT_ASSERTION_FAILED > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static RenderingAPIException create (Int2Type< ERR_RENDERINGAPI_ERROR > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static InternalErrorException create (Int2Type< ERR_INTERNAL_ERROR > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static ItemIdentityException create (Int2Type< ERR_DUPLICATE_ITEM > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static ItemIdentityException create (Int2Type< ERR_ITEM_NOT_FOUND > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static InvalidParametersException create (Int2Type< ERR_INVALIDPARAMS > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static InvalidStateException create (Int2Type< ERR_INVALID_STATE > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static IOException create (Int2Type< ERR_CANNOT_WRITE_TO_FILE > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static FileNotFoundException create (Int2Type< ERR_FILE_NOT_FOUND > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static UnimplementedException create (Int2Type< ERR_NOT_IMPLEMENTED > code, const Object *object, const std::string &desc, const std::string &src, const char *file, long line)
static ValueNotDeletedException create (Int2Type< ERR_VALUE_NOT_DELETED_ERROR > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static SourceCompilationException create (Int2Type< ERR_SOURCE_COMPILATION_ERROR > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static RuntimeAssertionException create (Int2Type< ERR_RT_ASSERTION_FAILED > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static RenderingAPIException create (Int2Type< ERR_RENDERINGAPI_ERROR > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static InternalErrorException create (Int2Type< ERR_INTERNAL_ERROR > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static ItemIdentityException create (Int2Type< ERR_DUPLICATE_ITEM > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static ItemIdentityException create (Int2Type< ERR_ITEM_NOT_FOUND > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static InvalidParametersException create (Int2Type< ERR_INVALIDPARAMS > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static InvalidStateException create (Int2Type< ERR_INVALID_STATE > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static IOException create (Int2Type< ERR_CANNOT_WRITE_TO_FILE > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static FileNotFoundException create (Int2Type< ERR_FILE_NOT_FOUND > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)
static UnimplementedException create (Int2Type< ERR_NOT_IMPLEMENTED > code, const Object &object, const std::string &desc, const std::string &src, const char *file, long line)

Private Member Functions

 ExceptionFactory ()
 Private constructor, no construction.


Detailed Description

Class implementing dispatch methods in order to construct by-value exceptions of a derived type based just on an exception code.

This nicely handles construction of derived Exceptions by value (needed for throwing) without suffering from ambiguity - each code is turned into a distinct type so that methods can be overloaded. This allows EXCEPT to stay small in implementation (desirable since it is embedded) whilst still performing rich code-to-type mapping.

Definition at line 328 of file exception.h.


Constructor & Destructor Documentation

gpucalc::ExceptionFactory::ExceptionFactory (  )  [inline, private]

Private constructor, no construction.

Definition at line 335 of file exception.h.

00336    {
00337    }


Member Function Documentation

static ValueNotDeletedException gpucalc::ExceptionFactory::create ( Int2Type< ERR_VALUE_NOT_DELETED_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 503 of file exception.h.

00505    {
00506     return ValueNotDeletedException(code.number, *object, desc, src, file, line);
00507    }

static SourceCompilationException gpucalc::ExceptionFactory::create ( Int2Type< ERR_SOURCE_COMPILATION_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 496 of file exception.h.

00498    {
00499     return SourceCompilationException(code.number, *object, desc, src, file, line);
00500    }

static RuntimeAssertionException gpucalc::ExceptionFactory::create ( Int2Type< ERR_RT_ASSERTION_FAILED >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 489 of file exception.h.

00491    {
00492     return RuntimeAssertionException(code.number, *object, desc, src, file, line);
00493    }

static RenderingAPIException gpucalc::ExceptionFactory::create ( Int2Type< ERR_RENDERINGAPI_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 482 of file exception.h.

00484    {
00485     return RenderingAPIException(code.number, *object, desc, src, file, line);
00486    }

static InternalErrorException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INTERNAL_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 475 of file exception.h.

00477    {
00478     return InternalErrorException(code.number, *object, desc, src, file, line);
00479    }

static ItemIdentityException gpucalc::ExceptionFactory::create ( Int2Type< ERR_DUPLICATE_ITEM >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 468 of file exception.h.

00470    {
00471     return ItemIdentityException(code.number, *object, desc, src, file, line);
00472    }

static ItemIdentityException gpucalc::ExceptionFactory::create ( Int2Type< ERR_ITEM_NOT_FOUND >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 461 of file exception.h.

00463    {
00464     return ItemIdentityException(code.number, *object, desc, src, file, line);
00465    }

static InvalidParametersException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INVALIDPARAMS >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 454 of file exception.h.

00456    {
00457     return InvalidParametersException(code.number, *object, desc, src, file, line);
00458    }

static InvalidStateException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INVALID_STATE >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 447 of file exception.h.

00449    {
00450     return InvalidStateException(code.number, *object, desc, src, file, line);
00451    }

static IOException gpucalc::ExceptionFactory::create ( Int2Type< ERR_CANNOT_WRITE_TO_FILE >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 440 of file exception.h.

00442    {
00443     return IOException(code.number, *object, desc, src, file, line);
00444    }

static FileNotFoundException gpucalc::ExceptionFactory::create ( Int2Type< ERR_FILE_NOT_FOUND >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 433 of file exception.h.

00435    {
00436     return FileNotFoundException(code.number, *object, desc, src, file, line);
00437    }

static UnimplementedException gpucalc::ExceptionFactory::create ( Int2Type< ERR_NOT_IMPLEMENTED >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 426 of file exception.h.

00428    {
00429     return UnimplementedException(code.number, *object, desc, src, file, line);
00430    }

static ValueNotDeletedException gpucalc::ExceptionFactory::create ( Int2Type< ERR_VALUE_NOT_DELETED_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 418 of file exception.h.

00420    {
00421     return ValueNotDeletedException(code.number, object, desc, src, file, line);
00422    }

static SourceCompilationException gpucalc::ExceptionFactory::create ( Int2Type< ERR_SOURCE_COMPILATION_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 411 of file exception.h.

00413    {
00414     return SourceCompilationException(code.number, object, desc, src, file, line);
00415    }

static RuntimeAssertionException gpucalc::ExceptionFactory::create ( Int2Type< ERR_RT_ASSERTION_FAILED >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 404 of file exception.h.

00406    {
00407     return RuntimeAssertionException(code.number, object, desc, src, file, line);
00408    }

static RenderingAPIException gpucalc::ExceptionFactory::create ( Int2Type< ERR_RENDERINGAPI_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 397 of file exception.h.

00399    {
00400     return RenderingAPIException(code.number, object, desc, src, file, line);
00401    }

static InternalErrorException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INTERNAL_ERROR >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 390 of file exception.h.

00392    {
00393     return InternalErrorException(code.number, object, desc, src, file, line);
00394    }

static ItemIdentityException gpucalc::ExceptionFactory::create ( Int2Type< ERR_DUPLICATE_ITEM >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 383 of file exception.h.

00385    {
00386     return ItemIdentityException(code.number, object, desc, src, file, line);
00387    }

static ItemIdentityException gpucalc::ExceptionFactory::create ( Int2Type< ERR_ITEM_NOT_FOUND >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 376 of file exception.h.

00378    {
00379     return ItemIdentityException(code.number, object, desc, src, file, line);
00380    }

static InvalidParametersException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INVALIDPARAMS >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 369 of file exception.h.

00371    {
00372     return InvalidParametersException(code.number, object, desc, src, file, line);
00373    }

static InvalidStateException gpucalc::ExceptionFactory::create ( Int2Type< ERR_INVALID_STATE >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 362 of file exception.h.

00364    {
00365     return InvalidStateException(code.number, object, desc, src, file, line);
00366    }

static IOException gpucalc::ExceptionFactory::create ( Int2Type< ERR_CANNOT_WRITE_TO_FILE >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 355 of file exception.h.

00357    {
00358     return IOException(code.number, object, desc, src, file, line);
00359    }

static FileNotFoundException gpucalc::ExceptionFactory::create ( Int2Type< ERR_FILE_NOT_FOUND >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 348 of file exception.h.

00350    {
00351     return FileNotFoundException(code.number, object, desc, src, file, line);
00352    }

static UnimplementedException gpucalc::ExceptionFactory::create ( Int2Type< ERR_NOT_IMPLEMENTED >  code,
const Object object,
const std::string &  desc,
const std::string &  src,
const char *  file,
long  line 
) [inline, static]

Definition at line 341 of file exception.h.

00343    {
00344     return UnimplementedException(code.number, object, desc, src, file, line);
00345    }


The documentation for this class was generated from the following file:

Generated on Thu Mar 5 22:36:43 2009 for gpucalc by  doxygen 1.5.6