Free Electron
SurfaceAccessibleGeo.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 __json_SurfaceAccessibleGeo_h__
8 #define __json_SurfaceAccessibleGeo_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief JSON Geo Surface Binding
17 
18  @ingroup json
19 *//***************************************************************************/
20 class FE_DL_EXPORT SurfaceAccessibleGeo:
21  public SurfaceAccessibleBase,
22  public CastableAs<SurfaceAccessibleGeo>
23 {
24  public:
25  SurfaceAccessibleGeo(void) {}
26 virtual ~SurfaceAccessibleGeo(void) {}
27 
28  //* As Protectable
29 virtual Protectable* clone(Protectable* pInstance=NULL);
30 
31  //* as SurfaceAccessibleI
32 
34 
35 virtual void bind(Instance a_instance)
36  {
37  m_spJsonRoot=
38  a_instance.cast< sp<Component> >();
39  }
40 virtual BWORD isBound(void)
41  { return (m_spJsonRoot.isValid()); }
42 
44 
45 virtual sp<SurfaceAccessorI> accessor(String a_node,Element a_element,
46  String a_name,Creation a_create,
47  Writable a_writable);
48 
49 virtual sp<SurfaceAccessorI> accessor(String a_node,Element a_element,
50  Attribute a_attribute,
51  Creation a_create,
52  Writable a_writable);
53 
55 
56 virtual BWORD load(String a_filename,
57  sp<Catalog> a_spSettings);
58 
60 
61 virtual BWORD save(String a_filename,
62  sp<Catalog> a_spSettings);
63 
64  using SurfaceAccessibleBase::attributeSpecs;
65 
66 virtual void attributeSpecs(
68  a_rSpecs,
69  String a_node,
70  SurfaceAccessibleI::Element
71  a_element) const;
72 
73  //* JSON specific
74  void setJsonRoot(sp<JsonValue> a_spJsonRoot)
75  { m_spJsonRoot=a_spJsonRoot; }
76 
77  sp<JsonValue> jsonRoot(void) { return m_spJsonRoot; }
78 
79  private:
80 
81 virtual void reset(void);
82 
83  sp<JsonValue> m_spJsonRoot;
84 };
85 
86 } /* namespace ext */
87 } /* namespace fe */
88 
89 #endif /* __json_SurfaceAccessibleGeo_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
virtual void bind(Instance a_instance)
associate with model data
Definition: SurfaceAccessibleGeo.h:35
virtual void bind(Instance a_instance)
associate with model data
Definition: SurfaceAccessibleBase.h:31
Automatically reference-counted string container.
Definition: String.h:128
JSON Geo Surface Binding.
Definition: SurfaceAccessibleGeo.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
virtual BWORD save(String a_filename)
save model data to file
Definition: SurfaceAccessibleBase.h:48
virtual BWORD isBound(void)
Return true if surface is available.
Definition: SurfaceAccessibleGeo.h:40
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