SORTIE Core C++ Documentation
Classes | Variables
Messages.h File Reference

ERROR AND MESSAGE PASSING This defines a set of codes that can be used to pass errors and messages. More...

#include <string>

Classes

struct  modelMsg
 This is the structure for sending and receiving messages. More...
 
struct  modelErr
 Error reporting structure. More...
 

Variables

const int UNKNOWN = 0
 Message of unknown type. More...
 
const int NO_MESSAGE = 1
 No message to pass. More...
 
const int PAUSE_RUN = 2
 Request to pause run. More...
 
const int RUN = 3
 Request to run model. More...
 
const int INPUT_FILE = 4
 Request to input file. More...
 
const int QUIT = 5
 Request to quit model. More...
 
const int MODEL_READY = 6
 Model is in ready state. More...
 
const int MODEL_NOT_READY = 7
 Model is not in ready state. More...
 
const int MODEL_PAUSED = 8
 Model is paused. More...
 
const int RUN_COMPLETE = 9
 Requested run is complete. More...
 
const int COMMAND_DONE = 10
 Model is finished executing command. More...
 
const int INFO = 11
 Message in the cMoreInfo string should be passed to the user. More...
 
const int BAD_ARGUMENT = 12
 A bad or missing argument has been passed from the interface for a command. More...
 
const int BAD_COMMAND = 13
 A bad command has been passed from the interface. More...
 
const int CANT_FIND_OBJECT = 14
 An object could not be found. More...
 
const int TREE_WRONG_TYPE = 15
 A tree was not of an expected type. More...
 
const int ACCESS_VIOLATION = 16
 An access violation occurred. More...
 
const int BAD_FILE = 17
 Bad file name or path - couldn't open the file. More...
 
const int BAD_FILE_TYPE = 18
 A file was not an expected type. More...
 
const int BAD_XML_FILE = 19
 XML file is malformed or invalid. More...
 
const int NEED_FILE = 20
 Expected file name and didn't get one. More...
 
const int DATA_MISSING = 21
 Couldn't find needed data in file. More...
 
const int BAD_DATA = 22
 Data was scrambled, of incorrect type, or otherwise invalid. More...
 
const int DATA_READ_ONLY = 23
 Data isn't accessible for writing. More...
 
const int ILLEGAL_OP = 24
 Illegal operation. More...
 

Detailed Description

ERROR AND MESSAGE PASSING This defines a set of codes that can be used to pass errors and messages.

The modelErr structure is used to pass fatal errors. These errors stop processing and cause the erasure of all data. This puts the model in a state ready to be initialized once again.

The modelMsg structure is used to pass non-fatal errors and messages. These stop processing but do not cause data erasure. An object passing one of these messages is responsible for internal data cleanup.

Copyright 2003 Charles D. Canham.


Edit history:
---------------------—
10/26/2012: Changed to std::strings from c chars (LEM)

Variable Documentation

◆ ACCESS_VIOLATION

const int ACCESS_VIOLATION = 16

An access violation occurred.

◆ BAD_ARGUMENT

const int BAD_ARGUMENT = 12

A bad or missing argument has been passed from the interface for a command.

◆ BAD_COMMAND

const int BAD_COMMAND = 13

A bad command has been passed from the interface.

◆ BAD_DATA

const int BAD_DATA = 22

Data was scrambled, of incorrect type, or otherwise invalid.

◆ BAD_FILE

const int BAD_FILE = 17

Bad file name or path - couldn't open the file.

◆ BAD_FILE_TYPE

const int BAD_FILE_TYPE = 18

A file was not an expected type.

◆ BAD_XML_FILE

const int BAD_XML_FILE = 19

XML file is malformed or invalid.

◆ CANT_FIND_OBJECT

const int CANT_FIND_OBJECT = 14

An object could not be found.

◆ COMMAND_DONE

const int COMMAND_DONE = 10

Model is finished executing command.

◆ DATA_MISSING

const int DATA_MISSING = 21

Couldn't find needed data in file.

◆ DATA_READ_ONLY

const int DATA_READ_ONLY = 23

Data isn't accessible for writing.

◆ ILLEGAL_OP

const int ILLEGAL_OP = 24

Illegal operation.

◆ INFO

const int INFO = 11

Message in the cMoreInfo string should be passed to the user.

◆ INPUT_FILE

const int INPUT_FILE = 4

Request to input file.

◆ MODEL_NOT_READY

const int MODEL_NOT_READY = 7

Model is not in ready state.

◆ MODEL_PAUSED

const int MODEL_PAUSED = 8

Model is paused.

◆ MODEL_READY

const int MODEL_READY = 6

Model is in ready state.

◆ NEED_FILE

const int NEED_FILE = 20

Expected file name and didn't get one.

◆ NO_MESSAGE

const int NO_MESSAGE = 1

No message to pass.

◆ PAUSE_RUN

const int PAUSE_RUN = 2

Request to pause run.

◆ QUIT

const int QUIT = 5

Request to quit model.

◆ RUN

const int RUN = 3

Request to run model.

◆ RUN_COMPLETE

const int RUN_COMPLETE = 9

Requested run is complete.

◆ TREE_WRONG_TYPE

const int TREE_WRONG_TYPE = 15

A tree was not of an expected type.

◆ UNKNOWN

const int UNKNOWN = 0

Message of unknown type.