PropertySet.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/Base.h"
16 #include "CeeCore/RefCountedObject.h"
17 #include "CeeCore/Variant.h"
18 #include "CeeCore/Str.h"
19 
20 namespace cee {
21 
22 
23 //==================================================================================================
24 //
25 //
26 //
27 //==================================================================================================
28 class CEE_CORE_EXPORT PropertySet : public RefCountedObject
29 {
30 public:
31  PropertySet(const Str& classType);
32  PropertySet(const PropertySet& other);
33  virtual ~PropertySet();
34 
35  PropertySet& operator=(const PropertySet& rhs);
36  bool operator==(const PropertySet& rhs) const;
37  bool operator!=(const PropertySet& rhs) const;
38 
39  Str classType() const;
40 
41  Variant value(const Str& key) const;
42  void setValue(const Str& key, Variant data);
43 
44  std::vector<Str> allKeys() const;
45  std::vector<Variant> allValues() const;
46 
47 private:
48  CEE_PRIVATE_IMPL(PropertySet);
49 };
50 
51 
52 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
bool operator!=(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are different.
Definition: PtrRef.h:58
bool operator==(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are equal.
Definition: PtrRef.h:57
A property set stores a set of properties each consisting of a key and a value.
Definition: PropertySet.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
The Variant class acts like a union for the most common data types.
Definition: Variant.h:30