PList.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 
46 class PAPILLON_API_CORE PList : public PObject
47 {
48 public:
52  PList();
53 
59  PList(const PList& other);
60 
64  virtual ~PList();
65 
71  PList& operator=(const PList& other);
72 
77  PList Clone() const;
78 
84  void Clear();
85 
91  bool IsEmpty() const;
92 
98  papillon::int32 Size() const;
99 
104  PResult Get(papillon::int32 index, PObject& element) const;
105 
110  PResult Set(papillon::int32 index, const PObject& element) const;
111 
116  PList& Add(const PObject& element);
117 
122  PList& AddFirst(const PObject& element);
123 
127  PList& Append(const PList& list);
128 
133  PResult Remove(papillon::int32 index);
134 
139  PResult RemoveLast();
140 
145  PResult RemoveFirst();
146 
151  bool Contains(const PObject& element) const;
152 
153 };
154 
155 PAPILLON_END_NAMESPACE
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
The PList class represents a generic container which handle an ordered collection of PObject; NOT thr...
Definition: PList.h:46
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
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