Main Page
Namespaces
Classes
Files
File List
File Members
MamdaOrderBookExceptions.h
Go to the documentation of this file.
1
/* $Id$
2
*
3
* OpenMAMA: The open middleware agnostic messaging API
4
* Copyright (C) 2011 NYSE Technologies, Inc.
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
* 02110-1301 USA
20
*/
21
22
#ifndef MamdaOrderBookExceptionsH
23
#define MamdaOrderBookExceptionsH
24
25
#include <stdexcept>
26
#include <string>
27
#include <
mamda/MamdaOptionalConfig.h
>
28
29
using
std::invalid_argument;
30
using
std::string;
31
32
namespace
Wombat
33
{
34
35
class
MamdaOrderBookEntry;
36
44
class
MAMDAOPTExpDLL
MamdaOrderBookException
:
public
invalid_argument
45
{
46
public
:
47
MamdaOrderBookException
(
const
string
& msg)
48
: invalid_argument (msg)
49
{}
50
virtual
~MamdaOrderBookException
() throw () {}
51
};
52
53
60
class
MAMDAOPTExpDLL
MamdaOrderBookDuplicateEntry
:
public
MamdaOrderBookException
61
{
62
public
:
63
MamdaOrderBookDuplicateEntry
(
MamdaOrderBookEntry
* origEntry,
64
MamdaOrderBookEntry
* dupEntry)
65
:
MamdaOrderBookException
(
"duplicate entry ID"
)
66
, mOrigEntry (origEntry)
67
, mDupEntry (dupEntry)
68
{}
69
MamdaOrderBookEntry
*
getOrigEntry
() {
return
mOrigEntry; }
70
MamdaOrderBookEntry
*
getDupEntry
() {
return
mDupEntry; }
71
72
private
:
73
MamdaOrderBookEntry
* mOrigEntry;
74
MamdaOrderBookEntry
* mDupEntry;
75
};
76
77
83
class
MAMDAOPTExpDLL
MamdaOrderBookMissingEntry
:
public
MamdaOrderBookException
84
{
85
public
:
86
MamdaOrderBookMissingEntry
(
const
string
& missingEntryId)
87
:
MamdaOrderBookException
(
"missing entry ID"
)
88
, mMissingId (missingEntryId)
89
{}
90
virtual
~MamdaOrderBookMissingEntry
() throw () {}
91
const
char
*
getMissingEntryId
() {
return
mMissingId.c_str(); }
92
93
private
:
94
string
mMissingId;
95
};
96
97
104
class
MAMDAOPTExpDLL
MamdaOrderBookInvalidEntry
:
public
MamdaOrderBookException
105
{
106
public
:
107
MamdaOrderBookInvalidEntry
(
const
MamdaOrderBookEntry
* entry,
108
const
string
& msg)
109
:
MamdaOrderBookException
(msg)
110
, mEntry (entry)
111
{}
112
const
MamdaOrderBookEntry
*
getInvalidEntry
() {
return
mEntry; }
113
114
private
:
115
const
MamdaOrderBookEntry
* mEntry;
116
};
117
118
119
}
// namespace
120
121
#endif // MamdaOrderBookExceptionsH
© 2012 Linux Foundation