HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_BuilderStatus.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GT_BuilderStatus.h ( GT Library, C++)
7  *
8  * COMMENTS: Status information about the build process
9  */
10 
11 #ifndef __GT_BuilderStatus__
12 #define __GT_BuilderStatus__
13 
14 #include "GT_API.h"
15 #include <UT/UT_WorkBuffer.h>
16 
17 /// Return the status of primitive creation from GT_PrimitiveBuilder
19 public:
21  : myStatus(true) {}
23 
24  /// @{
25  /// Called in the building API to add errors or warnings
26  void addError(const char *fmt, ...)
28  void addWarning(const char *fmt, ...)
30  /// @}
31 
32  /// Return success or failure
33  bool getStatus() const { return myStatus; }
34  /// Return a string of all the errors (may be a NULL ptr for no errors)
35  const char *getErrors() const
36  { return myErrors.length() ? myErrors.buffer() : NULL; }
37  /// Return a string of all the warnings (may be a NULL ptr for no warnings)
38  const char *getWarnings() const
39  { return myWarnings.length() ? myWarnings.buffer() : NULL; }
40 
41 private:
42  UT_WorkBuffer myErrors;
43  UT_WorkBuffer myWarnings;
44  bool myStatus;
45 };
46 
47 #endif
48 
const char * getWarnings() const
Return a string of all the warnings (may be a NULL ptr for no warnings)
#define GT_API
Definition: GT_API.h:13
const char * getErrors() const
Return a string of all the errors (may be a NULL ptr for no errors)
#define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check)
Definition: SYS_Types.h:447
Return the status of primitive creation from GT_PrimitiveBuilder.
#define const
Definition: zconf.h:214