OnixS C++ B3 BOE Binary Order Entry 1.4.0
Users' manual and API documentation
Loading...
Searching...
No Matches
SessionSchedule.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#pragma once
21
22#include <OnixS/B3/BOE/ABI.h>
23
24#include <string>
25#include <vector>
26
27namespace OnixS {
28namespace B3 {
29namespace BOE {
30namespace Scheduling {
31
34{
35 enum Enum
36 {
40
44 };
45
47 static Enum parse(const std::string & value);
48
50 static std::string toString(Enum value);
51};
52
55{
67
69 static Enum parse(const std::string & value);
70
72 static std::string toString(Enum value);
73
75 static Enum now();
76
78 static Enum utcNow();
79};
80
82typedef int Hours;
83
85typedef int Minutes;
86
88typedef int Seconds;
89
92{
93public:
95
97
100
103
106
109
111 std::string toString() const;
112
114 bool operator == (const TimeOfDay & other) const ONIXS_B3_BOE_NOTHROW;
115
117 bool operator != (const TimeOfDay & other) const ONIXS_B3_BOE_NOTHROW;
118
120 static TimeOfDay now();
121
124
126 static TimeOfDay bad();
127
129 static TimeOfDay parse(const std::string &);
130
131private:
132 Seconds seconds_;
133
135};
136
137inline
139{
140 return seconds_;
141}
142
143inline
144bool TimeOfDay::operator == (const TimeOfDay & other) const ONIXS_B3_BOE_NOTHROW
145{
146 return seconds_ == other.seconds_;
147}
148
149inline
150bool TimeOfDay::operator != (const TimeOfDay & other) const ONIXS_B3_BOE_NOTHROW
151{
152 return seconds_ != other.seconds_;
153}
154
157
212
213inline
215{
216 return logonTimes_[day];
217}
218
219inline
225
226inline
228{
229 return logoutTimes_[day];
230}
231
232inline
238
239inline
241{
242 return startOfWeek_;
243}
244
245inline
250}
251}
252}
253}
#define ONIXS_B3_BOE_EXPORTED
Definition Compiler.h:181
#define ONIXS_B3_BOE_NOTHROW
Definition Compiler.h:182
DayOfWeek::Enum resetDay() const noexcept
TimeOfDay logoutTime(DayOfWeek::Enum day) const noexcept
TimeOfDay logonTime(DayOfWeek::Enum day) const noexcept
SessionSchedule(DayOfWeek::Enum firstDay, DayOfWeek::Enum lastDay, TimeOfDay logonTime, TimeOfDay logoutTime, SequenceNumberResetPolicy::Enum seqNumberResetPolicy=SequenceNumberResetPolicy::Enum::Weekly)
SequenceNumberResetPolicy::Enum sequenceNumberResetPolicy() const noexcept
Defines the session sequence number reset policy.
SessionSchedule(const SessionSchedule &other)
static TimeOfDay parse(const std::string &)
Parses the time of day from the given string presentation.
static TimeOfDay midnight() noexcept
Seconds sinceMidnight() const noexcept
Minutes minutes() const noexcept
Seconds seconds() const noexcept
int Minutes
The number of minutes.
int Hours
The number of hours.
TimeOfDay TimeOfDayOfWeek[DayOfWeek::Total]
Collection of time of day values indexed by the day of week.
int Seconds
The number of seconds.
static Enum parse(const std::string &value)
Transforms the string presentation into a valid constant.
static std::string toString(Enum value)
Defines the session sequence number reset policy.
static Enum parse(const std::string &value)
Transforms the string presentation into a valid constant.
static std::string toString(Enum value)
Builds the string presentation for a given constant.