Support Forum G3D Web Page |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License. More...
Namespaces | |
G3D | |
G3D::_internal | |
Macros | |
#define | G3D_BEGIN_ENUM_CLASS_DECLARATION(ClassName, ...) |
#define | G3D_DECLARE_ENUM_CLASS(ClassName, ...) |
More... | |
#define | G3D_DECLARE_ENUM_CLASS_HASHCODE(Classname) |
Must be used at top level (i.e., not inside a class or namespace), with a fully qualified class name. More... | |
#define | G3D_DECLARE_ENUM_CLASS_METHODS(Classname) |
Creates a series of methods that turn a class into a scoped enumeration. More... | |
#define | G3D_END_ENUM_CLASS_DECLARATION() } |
Functions | |
template<class EnumClass , class EnumClassValue > | |
void | G3D::enumToJavaScriptDeclaration (TextOutput &t) |
Generates JavaScript source code defining an enum equivalent to EnumClass. More... | |
const char ** | G3D::_internal::smartEnumParseNames (const char *enumValList) |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License.
#define G3D_BEGIN_ENUM_CLASS_DECLARATION | ( | ClassName, | |
... | |||
) |
#define G3D_DECLARE_ENUM_CLASS | ( | ClassName, | |
... | |||
) |
Provides these methods:
#define G3D_DECLARE_ENUM_CLASS_HASHCODE | ( | Classname | ) |
Must be used at top level (i.e., not inside a class or namespace), with a fully qualified class name.
#define G3D_DECLARE_ENUM_CLASS_METHODS | ( | Classname | ) |
Creates a series of methods that turn a class into a scoped enumeration.
Example of use:
Supports enumerations with initializer values.
Extends the "Intelligent Enum" design pattern http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4001/
Enum classes are initialized to their zero value by default.
See G3D-app/GKey.h and G3D-base/WrapMode for an example.
#define G3D_END_ENUM_CLASS_DECLARATION | ( | ) | } |