PObjectType.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 
26 class PAPILLON_API_CORE PObjectType : public PObject
27 {
28 public:
33  {
34  E_UNKNOWN = 0,
35  E_FACE = 1,
36  E_PERSON = 2,
37  E_MOTION = 3,
38  E_OTHER = 4,
39  E_FACE_META_DATA = 5
40  };
41 
42 public:
46  explicit PObjectType(EObjectType objectType = E_UNKNOWN);
47 
51  PObjectType(const PObjectType& other);
52 
56  static const PObjectType& FromString(const PString& objectType);
57 
61  ~PObjectType() override;
62 
66  PObjectType& operator=(const PObjectType& other);
67 
71  EObjectType GetType() const;
72 
76  bool IsUnknown() const;
77 
81  bool IsFace() const;
82 
86  bool IsPerson() const;
87 
91  bool IsMotion() const;
92 
96  bool IsFaceMetaData() const;
97 
101  bool operator==(const PObjectType& other) const;
102 
106  bool operator!=(const PObjectType& other) const;
107 
111  PString GetName() const;
112 
113 public:
117  static const PObjectType C_UNKNOWN;
118 
122  static const PObjectType C_FACE;
123 
128 
132  static const PObjectType C_PERSON;
133 
137  static const PObjectType C_MOTION;
138 
142  static const PObjectType C_OTHER;
143 
144 private:
145 
146  //friend class PObjectTypeImpl;
147 };
148 
149 PAPILLON_END_NAMESPACE
static const PObjectType C_PERSON
A constant holding the PERSON object type.
Definition: PObjectType.h:132
The PString class provides an Unicode character strings.
Definition: PString.h:37
PResult FromString(const PString &s)
Builds a PObject from a string (destringify).
static const PObjectType C_MOTION
A constant holding the MOTION object type.
Definition: PObjectType.h:137
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
static const PObjectType C_FACE
A constant holding the FACE object type.
Definition: PObjectType.h:122
EObjectType
All the available object types.
Definition: PObjectType.h:32
Class PObject: the root class of all Papillon classes.
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45
static const PObjectType C_FACE_META_DATA
A constant holding the FACE_META_DATA object type.
Definition: PObjectType.h:127
The PObjectType class represents a type of object found in a video stream (can be Face...
Definition: PObjectType.h:26
static const PObjectType C_UNKNOWN
A constant holding the UNKNOWN object type.
Definition: PObjectType.h:117
static const PObjectType C_OTHER
A constant holding the OTHER object type.
Definition: PObjectType.h:142