18 #include "GlfStatus.h"
20 const char* GlfStatus::enumStatusString[] = {
33 return(enumStatusString[statusEnum]);
79 myMessage += newMessage;
97 myMessage += newMessage;
107 myType = newStatus.myType;
113 myMessage += newStatus.myMessage;
127 return(myMessage.c_str());
144 return(compStatus != myType);
150 return(compStatus == myType);
This class is used to track the status results of some methods in the GLF classes using the status en...
static bool isContinuableStatus(GlfStatus::Status status)
Returns whether or not it is "safe" to keep processing the file after the specified status return.
static const char * getStatusString(GlfStatus::Status statusEnum)
Returns the string representation of the specified enum.
const char * getStatusMessage() const
Return the status message.
GlfStatus & operator=(Status newStatus)
Overload operator = to set the glf status type to the passed in status and to clear the message strin...
void setStatus(Status newStatus, const char *newMessage)
Set the status with the specified values.
bool operator==(const GlfStatus::Status &compStatus) const
Overload operator != to determine if the passed in type is equal to this status's type.
Status getStatus() const
Return the enum for this status.
void addError(Status newStatus, const char *newMessage)
Adds the specified error message to the status message, setting the status to newStatus if the curren...
bool operator!=(const GlfStatus::Status &compStatus) const
Overload operator != to determine if the passed in type is not equal to this status's type.
Status
Return value enum for the GlfFile class methods.
@ UNKNOWN
unknown result (default value should never be used)
@ SUCCESS
method completed successfully.
@ FAIL_PARSE
failed to parse a record/header - invalid format.
void reset()
Resets this status.