MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
objectType.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
8 
9 
10 #pragma once
11 
12 #include "legionDataStore/export.h"
14 
15 #include <iostream>
16 
17 namespace Legion
18 {
22  {
23  public:
25  ObjectType();
26  ObjectType(Int8* values);
27  ObjectType(Int8 knd, Int8 dom, Int16 ctr, Int8 cat, Int8 sub, Int8 spec, Int8 ext);
28 
30  bool operator== (const ObjectType& rhs) const
31  {
32  return
33  val == rhs.val;
34  };
35 
37  bool operator!= (const ObjectType& rhs) const
38  {
39  return val != rhs.val;
40  };
41 
43  bool matches(const ObjectType& rhs) const
44  {
45  if ((kind == -1 || kind == rhs.kind) &&
46  (domain == -1 || domain == rhs.domain) &&
47  (country == -1 || country == rhs.country) &&
48  (category == -1 || category == rhs.category) &&
49  (subcategory == -1 || subcategory == rhs.subcategory) &&
50  (specific == -1 || specific == rhs.specific) &&
51  (extra == -1 || extra == rhs.extra))
52  {
53  return true;
54  }
55 
56  return false;
57  }
58 
59  union
60  {
61  struct {
69  };
70 
72  };
73 
76  bool operator<(const ObjectType &type) const;
77 
78  };
79 
80 
82  LEGION_DLL std::ostream& operator<< (std::ostream& outputStr, const ObjectType& type);
83 }
Int8 kind
Definition: objectType.h:62
Int8 subcategory
Definition: objectType.h:66
Int8 category
Definition: objectType.h:65
Int8 extra
Definition: objectType.h:68
Int8 specific
Definition: objectType.h:67
bool matches(const ObjectType &rhs) const
Determines if two object types match, includes checking for wild card values (-1) ...
Definition: objectType.h:43
#define LEGION_DLL
Definition: legionDataStore/export.h:24
Int8 domain
Definition: objectType.h:63
signed char Int8
Definition: dataTypes.h:41
unsigned long long UInt64
Definition: dataTypes.h:46
Int16 country
Definition: objectType.h:64
The Object type contains a 7-digit tuple representing the type of a simulation entity Recommend follo...
Definition: objectType.h:21
UInt64 val
Definition: objectType.h:71
short Int16
Definition: dataTypes.h:43
LEGION_DLL std::ostream & operator<<(std::ostream &outputStr, const ObjectType &type)
debugging output

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)