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 {
20 public:
22  : myStatus(true) {}
24 
25  /// @{
26  /// Called in the building API to add errors or warnings
27  void addError(const char *fmt, ...)
29  void addWarning(const char *fmt, ...)
31  /// @}
32 
33  /// Return success or failure
34  bool getStatus() const { return myStatus; }
35  /// Return a string of all the errors (may be a NULL ptr for no errors)
36  const char *getErrors() const
37  { return myErrors.length() ? myErrors.buffer() : NULL; }
38  /// Return a string of all the warnings (may be a NULL ptr for no warnings)
39  const char *getWarnings() const
40  { return myWarnings.length() ? myWarnings.buffer() : NULL; }
41 
42 private:
43  UT_WorkBuffer myErrors;
44  UT_WorkBuffer myWarnings;
45  bool myStatus;
46 };
47 
48 #endif
49 
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:448
Return the status of primitive creation from GT_PrimitiveBuilder.