libUTL++
Mapping.h
1 #pragma once
2 
4 
5 #include <libutl/String.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
26 
28 class Mapping : public Object, protected FlagsMI
29 {
32 
33 public:
35  bool
36  isOwner() const
37  {
38  return getFlag(flg_owner);
39  }
40 
42  void
43  setOwner(bool owner)
44  {
45  setFlag(flg_owner, owner);
46  }
47 
53  virtual Object* map(const Object* object) const = 0;
54 
55 private:
56  enum flg_t
57  {
58  flg_owner
59  };
60 };
61 
63 
64 UTL_NS_END;
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
Mix-in to provide 64-bits for space-efficient storage of up to 64 boolean flags.
Definition: FlagsMI.h:25
#define UTL_CLASS_DECL_ABC(DC, BC)
Declaration of standard UTL++ functionality for an abstract base class (ABC).
Definition: macros.h:650
void setOwner(bool owner)
Set the owner flag.
Definition: Mapping.h:43
Abstraction for object->object mapping.
Definition: Mapping.h:28
bool isOwner() const
Get the owner flag.
Definition: Mapping.h:36
Root of UTL++ class hierarchy.
Definition: Object.h:52