Beamlib 3.1.1
This is the Beam C++ class library.
Loading...
Searching...
No Matches
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) 2022 All Right Reserved, Beam Ltd, https://www.beam.ltd.uk
5 * For license see LICENSE.txt at the root of the beamlib source tree.
6 *******************************************************************************
7 */
8#ifndef BErrorTime_H
9#define BErrorTime_H 1
10
11#include <BString.h>
12#include <BTimeStamp.h>
13
16public:
17 enum Type { None = 0, Error = 1 };
18
19 BErrorTime(int errNo = None, BTimeStamp errTime = BTimeStamp(), BString errStr = "");
20
21 BErrorTime& set(int errNo, BTimeStamp errTime = BTimeStamp(), BString errStr = "");
22 BErrorTime& clear();
23 int getErrorNo() const;
24 BTimeStamp getTime() const;
25 BString getString() const;
26
28 operator int() const;
29
30private:
31 int oerrNo;
32 BTimeStamp oerrTime;
33 BString oerrStr;
34};
35
36#endif
Error return class with time field.
Definition: BErrorTime.h:15
BTimeStamp getTime() const
Get time.
Definition: BErrorTime.cpp:36
Type
Definition: BErrorTime.h:17
@ Error
Definition: BErrorTime.h:17
@ None
Definition: BErrorTime.h:17
BErrorTime & clear()
Clear the error.
Definition: BErrorTime.cpp:27
BString getString() const
Get error message.
Definition: BErrorTime.cpp:40
BErrorTime copy()
Return an independant copy.
Definition: BErrorTime.cpp:44
int getErrorNo() const
Get The error number.
Definition: BErrorTime.cpp:32
BErrorTime & set(int errNo, BTimeStamp errTime=BTimeStamp(), BString errStr="")
Set error number and message.
Definition: BErrorTime.cpp:20
This class stores and manipulates ASCII strings.
Definition: BString.h:20
A date and time storage class with microsecond resolution.
Definition: BTimeStamp.h:17