MAK Legion 1.1 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 {
21  class LEGION_DLL ObjectType
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  static const ObjectType& nullType()
31  {
32  static ObjectType aNullType;
33  return aNullType;
34  }
35 
36  bool isNull() const
37  {
38  return *this == nullType();
39  }
40 
42  bool operator== (const ObjectType& rhs) const
43  {
44  return
45  val == rhs.val;
46  };
47 
49  bool operator!= (const ObjectType& rhs) const
50  {
51  return val != rhs.val;
52  };
53 
55  bool matches(const ObjectType& rhs) const
56  {
57  if ((kind == -1 || kind == rhs.kind) &&
58  (domain == -1 || domain == rhs.domain) &&
59  (country == -1 || country == rhs.country) &&
60  (category == -1 || category == rhs.category) &&
61  (subcategory == -1 || subcategory == rhs.subcategory) &&
62  (specific == -1 || specific == rhs.specific) &&
63  (extra == -1 || extra == rhs.extra))
64  {
65  return true;
66  }
67 
68  return false;
69  }
70 
71  union
72  {
73  struct {
81  };
82 
84  };
85 
88  bool operator<(const ObjectType &type) const;
89 
90  };
91 
92 
94  LEGION_DLL std::ostream& operator<< (std::ostream& outputStr, const ObjectType& type);
95 }
Int8 kind
Definition: objectType.h:74
Int8 subcategory
Definition: objectType.h:78
Int8 category
Definition: objectType.h:77
Int8 extra
Definition: objectType.h:80
Int8 specific
Definition: objectType.h:79
bool matches(const ObjectType &rhs) const
Determines if two object types match, includes checking for wild card values (-1) ...
Definition: objectType.h:55
Int8 domain
Definition: objectType.h:75
signed char Int8
Definition: dataTypes.h:41
bool isNull() const
Definition: objectType.h:36
unsigned long long UInt64
Definition: dataTypes.h:46
Int16 country
Definition: objectType.h:76
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:83
short Int16
Definition: dataTypes.h:43
LEGION_DLL std::ostream & operator<<(std::ostream &outputStr, const ObjectType &type)
debugging output
static const ObjectType & nullType()
returns an instance of 0:0:0:0:0:0:0
Definition: objectType.h:30

Document ID: Generated on Wed May 26 15:17:05 EDT 2021 from SVN revision 229676
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)