OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
Owner.h
Go to the documentation of this file.
1
4
// ###########################################################################################################################################################################################################################################################################################################################
5
6
#pragma once
7
8
// OpenTwin header
9
#include "
OTCore/CoreTypes.h
"
10
#include "
OTCore/CoreAPIExport.h
"
11
#include "
OTCore/Logger.h
"
12
13
// std header
14
#include <string>
15
#include <list>
16
#include <map>
17
18
namespace
ot
{
19
20
template
<
class
T>
21
class
__declspec(dllexport)
Owner {
22
public
:
23
Owner(
const
T& _id) : m_id(_id) {};
24
Owner(
const
Owner<T>& _other) : m_id(_other.m_id) {};
25
Owner& operator = (
const
Owner<T>& _other) { m_id = _other.m_id;
return
*
this
; };
26
virtual
~Owner() {};
27
28
bool
operator ==
(T _id)
const
{
return
m_id == _id; };
29
bool
operator ==
(
const
Owner<T>& _other)
const
{
return
m_id == _other.m_id; };
30
bool
operator != (T _id)
const
{
return
m_id != _id; };
31
bool
operator != (
const
Owner<T>& _other)
const
{
return
m_id != _other.m_id; };
32
bool
operator < (T _id)
const
{
return
m_id <= _id; };
33
bool
operator < (
const
Owner<T>& _other)
const
{
return
m_id < _other.m_id; };
34
//bool operator <= (T _id) const { return m_id <= _id; };
35
//bool operator <= (const Owner<T>& _other) const { return m_id <= _other.m_id; };
36
//bool operator > (T _id) const { return m_id > _id; };
37
//bool operator > (const Owner<T>& _other) const { return m_id > _other.m_id; };
38
//bool operator >= (T _id) const { return m_id >= _id; };
39
//bool operator >= (const Owner<T>& _other) const { return m_id >= _other.m_id; };
40
41
void
setId(
const
T& _id) { m_id = _id; };
42
T getId(
void
)
const
{
return
m_id; };
43
44
private
:
45
T m_id;
46
};
47
}
CoreAPIExport.h
CoreTypes.h
Logger.h
OpenTwin Logging system.
operator==
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition
Model.cpp:55
ot
Definition
Connector.h:8
Libraries
OTCore
include
OTCore
Owner.h
Generated by
1.10.0