Static Public Member Functions | Private Member Functions | List of all members
Ogre::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 <OgreException.h>

Static Public Member Functions

static UnimplementedException create (ExceptionCodeType< Exception::ERR_NOT_IMPLEMENTED > code, const String &desc, const String &src, const char *file, long line)
 
static FileNotFoundException create (ExceptionCodeType< Exception::ERR_FILE_NOT_FOUND > code, const String &desc, const String &src, const char *file, long line)
 
static IOException create (ExceptionCodeType< Exception::ERR_CANNOT_WRITE_TO_FILE > code, const String &desc, const String &src, const char *file, long line)
 
static InvalidStateException create (ExceptionCodeType< Exception::ERR_INVALID_STATE > code, const String &desc, const String &src, const char *file, long line)
 
static InvalidParametersException create (ExceptionCodeType< Exception::ERR_INVALIDPARAMS > code, const String &desc, const String &src, const char *file, long line)
 
static ItemIdentityException create (ExceptionCodeType< Exception::ERR_ITEM_NOT_FOUND > code, const String &desc, const String &src, const char *file, long line)
 
static ItemIdentityException create (ExceptionCodeType< Exception::ERR_DUPLICATE_ITEM > code, const String &desc, const String &src, const char *file, long line)
 
static InternalErrorException create (ExceptionCodeType< Exception::ERR_INTERNAL_ERROR > code, const String &desc, const String &src, const char *file, long line)
 
static RenderingAPIException create (ExceptionCodeType< Exception::ERR_RENDERINGAPI_ERROR > code, const String &desc, const String &src, const char *file, long line)
 
static RuntimeAssertionException create (ExceptionCodeType< Exception::ERR_RT_ASSERTION_FAILED > code, const String &desc, const String &src, const char *file, long line)
 

Private Member Functions

 ExceptionFactory ()
 Private constructor, no construction. More...
 

Detailed Description

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

Remarks
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 OGRE_EXCEPT to stay small in implementation (desirable since it is embedded) whilst still performing rich code-to-type mapping.

Definition at line 252 of file OgreException.h.

Constructor & Destructor Documentation

§ ExceptionFactory()

Ogre::ExceptionFactory::ExceptionFactory ( )
private

Private constructor, no construction.

Definition at line 256 of file OgreException.h.

Member Function Documentation

§ create() [1/10]

static UnimplementedException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_NOT_IMPLEMENTED code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 258 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [2/10]

static FileNotFoundException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_FILE_NOT_FOUND code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 265 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [3/10]

static IOException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_CANNOT_WRITE_TO_FILE code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 272 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [4/10]

static InvalidStateException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_INVALID_STATE code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 279 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [5/10]

static InvalidParametersException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_INVALIDPARAMS code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 286 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [6/10]

static ItemIdentityException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_ITEM_NOT_FOUND code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 293 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [7/10]

static ItemIdentityException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_DUPLICATE_ITEM code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 300 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [8/10]

static InternalErrorException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_INTERNAL_ERROR code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 307 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [9/10]

static RenderingAPIException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_RENDERINGAPI_ERROR code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 314 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

§ create() [10/10]

static RuntimeAssertionException Ogre::ExceptionFactory::create ( ExceptionCodeType< Exception::ERR_RT_ASSERTION_FAILED code,
const String desc,
const String src,
const char *  file,
long  line 
)
static

Definition at line 321 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jan 2 2017 11:48:44