Free Electron
SurfaceAccessibleCatalog.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __surface_SurfaceAccessibleCatalog_h__
8 #define __surface_SurfaceAccessibleCatalog_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Catalog Surface Binding
17 
18  @ingroup surface
19 *//***************************************************************************/
20 class FE_DL_EXPORT SurfaceAccessibleCatalog:
21  public SurfaceAccessibleBase,
22  public CastableAs<SurfaceAccessibleCatalog>
23 {
24  public:
26 virtual ~SurfaceAccessibleCatalog(void);
27 
28  //* As Protectable
29 virtual Protectable* clone(Protectable* pInstance=NULL);
30 
32 
33  //* as SurfaceAccessibleI
34 virtual void bind(Instance a_instance)
35  { setCatalog(
36  a_instance.cast< sp<Catalog> >()); }
37 virtual BWORD isBound(void)
38  { return catalog().isValid(); }
39 
41 
42 virtual BWORD load(String a_filename,
43  sp<Catalog> a_spSettings);
44 
46 
47 virtual BWORD save(String a_filename,
48  sp<Catalog> a_spSettings);
49 
50  using SurfaceAccessibleBase::attributeSpecs;
51 
52 virtual void attributeSpecs(
54  a_rSpecs,
55  String a_node,
56  SurfaceAccessibleI::Element
57  a_element) const;
58 
60 
61 virtual sp<SurfaceAccessorI> accessor(String a_node,
62  SurfaceAccessibleI::Element a_element,
63  String a_name,
64  SurfaceAccessibleI::Creation a_create,
65  SurfaceAccessibleI::Writable
66  a_writable);
67 virtual sp<SurfaceAccessorI> accessor(String a_node,
68  SurfaceAccessibleI::Element a_element,
69  SurfaceAccessibleI::Attribute
70  a_attribute,
71  SurfaceAccessibleI::Creation a_create,
72  SurfaceAccessibleI::Writable
73  a_writable);
74 
75  using SurfaceAccessibleBase::discard;
76 
77 virtual BWORD discard(SurfaceAccessibleI::Element a_element,
78  String a_name);
79 
80  //* Catalog specific
81  sp<Catalog> catalog(void);
82  void setCatalog(sp<Catalog> a_spCatalog)
83  { m_spCatalog=a_spCatalog; }
84 
85  void setKey(String a_key)
86  { m_key=a_key; }
87  String key(void)
88  { return m_key; }
89 
90  BWORD persistent(void)
91  { return m_persistent; }
92  void setPersistent(BWORD a_persistent)
93  { m_persistent=a_persistent; }
94 
95  protected:
96 virtual void reset(void);
97 
98  private:
99  sp<SurfaceAccessorI> createAccessor(void);
100 
101  sp<Catalog> m_spCatalog;
102  String m_key;
103  BWORD m_persistent;
104 };
105 
106 } /* namespace ext */
107 } /* namespace fe */
108 
109 #endif /* __surface_SurfaceAccessibleCatalog_h__ */
Common Functionality for Accessible Surface.
Definition: SurfaceAccessibleBase.h:20
Base class providing protection counting for cp<>
Definition: Protectable.h:28
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
kernel
Definition: namespace.dox:3
Catalog Surface Binding.
Definition: SurfaceAccessibleCatalog.h:20
virtual BWORD isBound(void)
Return true if surface is available.
Definition: SurfaceAccessibleCatalog.h:37
virtual void bind(Instance a_instance)
associate with model data
Definition: SurfaceAccessibleCatalog.h:34
virtual void bind(Instance a_instance)
associate with model data
Definition: SurfaceAccessibleBase.h:31
Automatically reference-counted string container.
Definition: String.h:128
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
virtual BWORD save(String a_filename)
save model data to file
Definition: SurfaceAccessibleBase.h:48
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192
virtual BWORD load(String a_filename)
load model data from file
Definition: SurfaceAccessibleBase.h:45
virtual sp< SurfaceAccessorI > accessor(String a_node, Element a_element, String a_name, Creation a_create, Writable a_writable)
Return access to an attribute.
Definition: SurfaceAccessibleBase.h:87