PBoxing.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PObject.h>
17 
18 PAPILLON_BEGIN_NAMESPACE
19 
49 template<typename T>
50 class PAPILLON_API_CORE PBoxing : public PObject
51 {
52 public:
56  PBoxing(const T& value = T(0));
57 
61  PBoxing(const PBoxing<T>& other);
62 
66  PBoxing<T>& operator=(const PBoxing<T>& other);
67 
71  T GetValue() const;
72 
73  bool operator< (T value) const;
74  bool operator<=(T value) const;
75  bool operator> (T value) const;
76  bool operator>=(T value) const;
77  bool operator==(T value) const;
78  bool operator!=(T value) const;
79 
80  bool operator< (const PBoxing<T>& value) const;
81  bool operator<=(const PBoxing<T>& value) const;
82  bool operator> (const PBoxing<T>& value) const;
83  bool operator>=(const PBoxing<T>& value) const;
84  bool operator==(const PBoxing<T>& value) const;
85  bool operator!=(const PBoxing<T>& value) const;
86 };
87 
99 
100 PAPILLON_END_NAMESPACE
PBoxing< papillon::uint8 > PUInt8
Definition: PBoxing.h:93
PBoxing< papillon::uint64 > PUInt64
Definition: PBoxing.h:96
PBoxing< papillon::uint16 > PUInt16
Definition: PBoxing.h:94
PBoxing< double > PDouble
Definition: PBoxing.h:98
Generic container to box primitive data types, like int (PInt32), bool (PBool) or double (PDouble)...
Definition: PBoxing.h:50
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
PBoxing< float > PFloat
Definition: PBoxing.h:97
PBoxing< papillon::int64 > PInt64
Definition: PBoxing.h:92
PBoxing< papillon::int32 > PInt32
Definition: PBoxing.h:91
PBoxing< papillon::uint32 > PUInt32
Definition: PBoxing.h:95
PBoxing< papillon::int8 > PInt8
Definition: PBoxing.h:89
PBoxing< papillon::int16 > PInt16
Definition: PBoxing.h:90
Class PObject: the root class of all Papillon classes.
PBoxing< bool > PBool
Definition: PBoxing.h:88
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45