WSF
WsfExtEntityId.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
13#ifndef WSFEXTENTITYID_HPP
14#define WSFEXTENTITYID_HPP
15
16#include "wsf_export.h"
17
18#include <iosfwd>
19#include <string>
20
22{
23public:
24 enum
25 {
26 ALL_SITES = 0xFFFF,
27 ALL_APPLIC = 0xFFFF,
28 ALL_ENTITIES = 0xFFFF,
33 };
34
36 : mSite(0)
37 , mApplication(0)
38 , mEntity(0)
39 {
40 }
41
42 WsfExtEntityId(int aSite, int aApplication, int aEntity)
43 : mSite(aSite)
44 , mApplication(aApplication)
45 , mEntity(aEntity)
46 {
47 }
48
49
50 bool IsDefined() const { return (mSite != 0 && mApplication != 0 && mEntity != 0); }
51
52 bool operator<(const WsfExtEntityId& aRhs) const;
53
54 bool operator==(const WsfExtEntityId& aRhs) const;
55
56 int GetSite() const { return mSite; }
57 int GetApplication() const { return mApplication; }
58 int GetEntity() const { return mEntity; }
59
60 void SetSite(int aSite) { mSite = aSite; }
61 void SetApplication(int aApplication) { mApplication = aApplication; }
62 void SetEntity(int aEntity) { mEntity = aEntity; }
63
64protected:
65 int mSite;
68};
69
70WSF_EXPORT std::ostream& operator<<(std::ostream& aOut, const WsfExtEntityId& aId);
71
72#endif
WSF_EXPORT std::ostream & operator<<(std::ostream &aOut, const WsfExtEntityId &aId)
Definition WsfExtEntityId.cpp:16
bool operator==(int aId, const WsfStringInt &aRhs)
Equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:69
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfExtEntityId.hpp:22
void SetEntity(int aEntity)
Definition WsfExtEntityId.hpp:62
@ RQST_ASSIGN_ID
Definition WsfExtEntityId.hpp:32
@ NO_SITES
Definition WsfExtEntityId.hpp:29
@ NO_APPLIC
Definition WsfExtEntityId.hpp:30
@ NO_ENTITY
Definition WsfExtEntityId.hpp:31
@ ALL_ENTITIES
Definition WsfExtEntityId.hpp:28
@ ALL_APPLIC
Definition WsfExtEntityId.hpp:27
@ ALL_SITES
Definition WsfExtEntityId.hpp:26
int mSite
Definition WsfExtEntityId.hpp:65
WsfExtEntityId()
Definition WsfExtEntityId.hpp:35
int mApplication
Definition WsfExtEntityId.hpp:66
int GetEntity() const
Definition WsfExtEntityId.hpp:58
int mEntity
Definition WsfExtEntityId.hpp:67
int GetSite() const
Definition WsfExtEntityId.hpp:56
void SetApplication(int aApplication)
Definition WsfExtEntityId.hpp:61
int GetApplication() const
Definition WsfExtEntityId.hpp:57
bool IsDefined() const
Definition WsfExtEntityId.hpp:50
void SetSite(int aSite)
Definition WsfExtEntityId.hpp:60
WsfExtEntityId(int aSite, int aApplication, int aEntity)
Definition WsfExtEntityId.hpp:42
Copyrights Multiple, All Rights Reserved