Free Electron
SurfaceAccessorDrone.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 __flight_SurfaceAccessorDrone_h__
8 #define __flight_SurfaceAccessorDrone_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Accessor for Drone meshes
17 
18  @ingroup flight
19 *//***************************************************************************/
20 class FE_DL_EXPORT SurfaceAccessorDrone:
21  public SurfaceAccessorBase,
22  public CastableAs<SurfaceAccessorDrone>
23 {
24  public:
26 virtual ~SurfaceAccessorDrone(void) {}
27 
28  using SurfaceAccessorBase::set;
29  using SurfaceAccessorBase::append;
30  using SurfaceAccessorBase::spatialVector;
31 
32  //* as SurfaceAccessorI
33  BWORD bind(SurfaceAccessibleI::Element a_element,
34  SurfaceAccessibleI::Attribute
35  a_attribute);
36  BWORD bind(SurfaceAccessibleI::Element a_element,
37  const String& a_name)
38  {
39  m_attribute=SurfaceAccessibleI::e_generic;
40  return bindInternal(a_element,a_name);
41  }
42 virtual U32 count(void) const;
43 virtual U32 subCount(U32 a_index) const;
44 
45 virtual void set(U32 a_index,U32 a_subIndex,String a_string) {}
46 virtual String string(U32 a_index,U32 a_subIndex=0);
47 
48 virtual void set(U32 a_index,U32 a_subIndex,I32 a_integer) {}
49 virtual I32 integer(U32 a_index,U32 a_subIndex=0) { return 0; }
50 
51 virtual I32 append(SurfaceAccessibleI::Form a_form)
52  { return 0; }
53 
54 virtual void append(U32 a_index,I32 a_integer) {}
55 
56 virtual void set(U32 a_index,U32 a_subIndex,Real a_real) {}
57 
58 virtual Real real(U32 a_index,U32 a_subIndex=0) { return 0.0; }
59 
60 virtual void set(U32 a_index,U32 a_subIndex,
61  const SpatialVector& a_vector) {}
62 virtual SpatialVector spatialVector(U32 a_index,U32 a_subIndex=0)
63  { return SpatialVector(0,0,0); }
64 
65 virtual void setSurface(sp<SurfaceI> a_spSurfaceI)
66  { m_spSurfaceI=a_spSurfaceI; }
67 
68  private:
69 
70 virtual BWORD bindInternal(
71  SurfaceAccessibleI::Element a_element,
72  const String& a_name);
73 
74  BWORD isBound(void) const
75  { return TRUE; }
76 
77  sp<SurfaceI> m_spSurfaceI;
78 };
79 
80 } /* namespace ext */
81 } /* namespace fe */
82 
83 
84 #endif /* __flight_SurfaceAccessorDrone_h__ */
kernel
Definition: namespace.dox:3
Accessor for Drone meshes.
Definition: SurfaceAccessorDrone.h:20
Common Functionality for Accessor Surface.
Definition: SurfaceAccessorBase.h:20
Automatically reference-counted string container.
Definition: String.h:128
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192