OnixS C++ CME iLink 3 Binary Order Entry Handler 1.18.9
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
23
24#include <string>
25#include <vector>
26
27namespace OnixS {
28namespace CME {
29namespace iLink3 {
30namespace Scheduling {
31
34{
46
48 static Enum parse(const std::string & value);
49
51 static std::string toString(Enum value);
52
54 static Enum now();
55
57 static Enum utcNow();
58};
59
61typedef int Hours;
62
64typedef int Minutes;
65
67typedef int Seconds;
68
71{
72public:
74
76
79
82
85
88
90 std::string toString() const;
91
93 bool operator == (const TimeOfDay & other) const ONIXS_ILINK3_NOTHROW;
94
96 bool operator != (const TimeOfDay & other) const ONIXS_ILINK3_NOTHROW;
97
99 static TimeOfDay now();
100
103
105 static TimeOfDay bad();
106
108 static TimeOfDay parse(const std::string &);
109
110private:
111 Seconds seconds_;
112
114};
115
116inline
118{
119 return seconds_;
120}
121
122inline
123bool TimeOfDay::operator == (const TimeOfDay & other) const ONIXS_ILINK3_NOTHROW
124{
125 return seconds_ == other.seconds_;
126}
127
128inline
129bool TimeOfDay::operator != (const TimeOfDay & other) const ONIXS_ILINK3_NOTHROW
130{
131 return seconds_ != other.seconds_;
132}
133
136
185
186inline
188{
189 return logonTimes_[day];
190}
191
192inline
198
199inline
201{
202 return logoutTimes_[day];
203}
204
205inline
211
212inline
214{
215 return startOfWeek_;
216}
217}
218}
219}
220}
#define ONIXS_ILINK3_EXPORTED
Definition Compiler.h:175
#define ONIXS_ILINK3_NOTHROW
Definition Compiler.h:176
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)
Constructor.
SessionSchedule(const SessionSchedule &other)
static TimeOfDay parse(const std::string &)
Parses the time of day from the given string presentation.
static TimeOfDay midnight() 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)