WSF
WsfXIO_PlatformId.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFXIO_PLATFORMID_HPP
13#define WSFXIO_PLATFORMID_HPP
14
15#include "wsf_export.h"
16
17#include <iosfwd>
18
20{
21public:
23 : mIndex(0)
24 , mConnectionId(0)
25 {
26 }
27
28 WsfXIO_PlatformId(unsigned int aIndex, int aConnectionId)
29 : mIndex(aIndex)
30 , mConnectionId(aConnectionId)
31 {
32 }
33
34 bool operator<(const WsfXIO_PlatformId& aRhs) const
35 {
36 if (mIndex < aRhs.mIndex)
37 {
38 return true;
39 }
40 if (mIndex > aRhs.mIndex)
41 {
42 return false;
43 }
44 return mConnectionId < aRhs.mConnectionId;
45 }
46
47 bool operator==(const WsfXIO_PlatformId& aRhs) const
48 {
49 return mIndex == aRhs.mIndex && mConnectionId == aRhs.mConnectionId;
50 }
51
52 bool operator!=(const WsfXIO_PlatformId& aRhs) const { return !operator==(aRhs); }
53
54 // stream extractor
55 friend WSF_EXPORT std::istream& operator>>(std::istream& aIn, WsfXIO_PlatformId& aId);
56
57 // stream inserter
58 friend WSF_EXPORT std::ostream& operator<<(std::ostream& aOut, const WsfXIO_PlatformId& aId);
59
60 unsigned int mIndex;
62};
63
64#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfXIO_PlatformId.hpp:20
unsigned int mIndex
Definition WsfXIO_PlatformId.hpp:60
bool operator<(const WsfXIO_PlatformId &aRhs) const
Definition WsfXIO_PlatformId.hpp:34
bool operator!=(const WsfXIO_PlatformId &aRhs) const
Definition WsfXIO_PlatformId.hpp:52
bool operator==(const WsfXIO_PlatformId &aRhs) const
Definition WsfXIO_PlatformId.hpp:47
friend WSF_EXPORT std::ostream & operator<<(std::ostream &aOut, const WsfXIO_PlatformId &aId)
Definition WsfXIO_ObjectInfo.cpp:413
int mConnectionId
Definition WsfXIO_PlatformId.hpp:61
WsfXIO_PlatformId(unsigned int aIndex, int aConnectionId)
Definition WsfXIO_PlatformId.hpp:28
friend WSF_EXPORT std::istream & operator>>(std::istream &aIn, WsfXIO_PlatformId &aId)
Definition WsfXIO_ObjectInfo.cpp:406
WsfXIO_PlatformId()
Definition WsfXIO_PlatformId.hpp:22
Copyrights Multiple, All Rights Reserved