13
0
livetrax/libs/audiographer/audiographer/throwing.h
Sakari Bergen 8da27200d1 - Fix process callbakc handling during export
- Fix filename handling when exporting multiple files
- Some updates to audiographer


git-svn-id: svn://localhost/ardour2/branches/3.0@6402 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-27 22:09:40 +00:00

33 lines
733 B
C++

#ifndef AUDIOGRAPHER_THROWING_H
#define AUDIOGRAPHER_THROWING_H
#ifndef DEFAULT_THROW_LEVEL
#define DEFAULT_THROW_LEVEL ThrowStrict
#endif
namespace AudioGrapher
{
enum ThrowLevel
{
ThrowNone, //< Not allowed to throw
ThrowObject, //< Object level stuff, ctors, initalizers etc.
ThrowProcess, //< Process cycle level stuff
ThrowStrict, //< Stricter checks than ThrowProcess, less than ThrowSample
ThrowSample //< Sample level stuff
};
/// Class that allows optimizing out error checking during compile time
template<ThrowLevel L = DEFAULT_THROW_LEVEL>
class Throwing
{
protected:
Throwing() {}
bool throw_level (ThrowLevel level) { return L >= level; }
};
} // namespace
#endif // AUDIOGRAPHER_THROWING_H