WT_Result Class Reference

#include <whiperrs.h>

List of all members.


Detailed Description

A return value and exception class.

The extension of C to C++ left enums in a half-baked state. The scope of the enum contents is the same as that of the enum definition, so it is necessary to either provide very long-winded names for each element, or to encapsulate each enum within a class and require qualification of each element by the class name (the resulting names look similar, but the second method allows us to keep the simpler names inside the definition, and is a more object-oriented approach). In addition, we can provide methods on the class to access elements using the internal enum. Additional methods are available for those enums which also act as bitmasks for multiple options. We can't use any form of template to do this as it would require defining the enum before the class, which defeats the whole purpose.

Use of the form Classname::Enum should only be required in special cases such as when a value stored as an integer is to be converted back into the internal enum, such as when catching the value as an exception in a try / catch block.

Essentially, we are recreating enums with the name scoping we desire.

Examples:

WhipExamples/Color.cpp, WhipExamples/ColorMap.cpp, WhipExamples/ContourSet.cpp, WhipExamples/DashPattern.cpp, WhipExamples/DataReading.cpp, WhipExamples/DrawingInfo.cpp, WhipExamples/FileRead.cpp, WhipExamples/FilledEllipse.cpp, WhipExamples/FillPattern.cpp, WhipExamples/Font.cpp, WhipExamples/GouraudPolyline.cpp, WhipExamples/GouraudPolytriangle.cpp, WhipExamples/Layer.cpp, WhipExamples/LinePattern.cpp, WhipExamples/LineWeight.cpp, WhipExamples/ObjectNode.cpp, WhipExamples/OutlineEllipse.cpp, WhipExamples/OutputBlocks.cpp, WhipExamples/Polygon.cpp, WhipExamples/Polyline.cpp, WhipExamples/Polymarker.cpp, WhipExamples/Polytriangle.cpp, WhipExamples/Text.cpp, WhipExamples/Url.cpp, WhipExamples/UserData.cpp, WhipExamples/View.cpp, WhipExamples/Viewport.cpp, and WhipExamples/Visibility.cpp.

Definition at line 105 of file whiperrs.h.

Public Types

enum  Enum
 An enumeration of result/exception values.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:25 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5