Beam-lib  2.16.3
This is the Beam C++ class library.
BErrorTime.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BErrorTime.h BErrorTime Class
3  * T.Barnaby, BEAM Ltd, 2010-05-26
4  * Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5  *******************************************************************************
6  */
7 #ifndef BErrorTime_H
8 #define BErrorTime_H 1
9 
10 #include <BString.h>
11 #include <BTimeStamp.h>
12 
14 class BErrorTime {
15 public:
16  enum Type { None = 0, Error = 1 };
17 
18  BErrorTime(int errNo = None, BTimeStamp errTime = BTimeStamp(), BString errStr = "");
19 
20  BErrorTime& set(int errNo, BTimeStamp errTime = BTimeStamp(), BString errStr = "");
21  BErrorTime& clear();
22  int getErrorNo() const;
23  BTimeStamp getTime() const;
24  BString getString() const;
25 
26  BErrorTime copy();
27  operator int() const;
28 
29 private:
30  int oerrNo;
31  BTimeStamp oerrTime;
32  BString oerrStr;
33 };
34 
35 #endif
Definition: BString.h:18
Definition: BErrorTime.h:16
BErrorTime copy()
Return an independant copy.
Definition: BErrorTime.cpp:37
BErrorTime(int errNo=None, BTimeStamp errTime=BTimeStamp(), BString errStr="")
Create object.
Definition: BErrorTime.cpp:9
BString getString() const
Get error message.
Definition: BErrorTime.cpp:33
BErrorTime & clear()
Clear the error.
Definition: BErrorTime.cpp:20
Type
Definition: BErrorTime.h:16
Definition: BErrorTime.h:16
BErrorTime & set(int errNo, BTimeStamp errTime=BTimeStamp(), BString errStr="")
Set error number and message.
Definition: BErrorTime.cpp:13
int getErrorNo() const
Get The error number.
Definition: BErrorTime.cpp:25
BTimeStamp getTime() const
Get time.
Definition: BErrorTime.cpp:29
Definition: BTimeStamp.h:15
Error return class.
Definition: BErrorTime.h:14