Free Electron
SurfaceAccessorI.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_SurfaceAccessorI_h__
8 #define __surface_SurfaceAccessorI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Surface Element Handle
17 
18  Accessor implementations are allowed to cache changes and are not required
19  to update the accessed data until destruction of the accessor.
20  As such, only one accessor for each surface's attribute should be used
21  at one time.
22  Otherwise, changes through one accessor may not be seen by the other,
23  and the flushing of data may happen with arbitrary collisions.
24 
25  @ingroup surface
26 *//***************************************************************************/
27 class FE_DL_EXPORT SurfaceAccessorI:
28  virtual public Component,
29  public CastableAs<SurfaceAccessorI>
30 {
31  public:
32 virtual BWORD writable(void) const =0;
33 virtual void setWritable(BWORD a_writable) =0;
34 
35 virtual String type(void) const =0;
36 virtual U32 count(void) const =0;
37 virtual U32 subCount(U32 index) const =0;
38 
39 virtual void set(U32 index,String a_string) =0;
40 virtual void set(U32 index,U32 subIndex,String a_string) =0;
41 virtual String string(U32 index,U32 subIndex=0) =0;
42 
43 virtual void set(U32 index,I32 a_integer) =0;
44 virtual void set(U32 index,U32 subIndex,I32 a_integer) =0;
45 virtual I32 integer(U32 index,U32 subIndex=0) =0;
46 
47 virtual I32 duplicate(U32 index,U32 subIndex=0) =0;
48 
49 virtual I32 append(void) =0;
50 virtual I32 append(SurfaceAccessibleI::Form a_form) =0;
51 virtual I32 append(I32 a_integer) =0;
52 virtual I32 append(I32 a_integer,
53  SurfaceAccessibleI::Form a_form) =0;
54 virtual void append(U32 index,I32 a_integer) =0;
55 
56  //* point indices for each vertex per primitive
57 virtual void append(Array< Array<I32> >&
58  a_rPrimVerts) =0;
59 
60 virtual void remove(U32 a_index,I32 a_integer=0) =0;
61 
62 virtual void set(U32 index,Real a_real) =0;
63 virtual void set(U32 index,U32 subIndex,Real a_real) =0;
64 virtual Real real(U32 index,U32 subIndex=0) =0;
65 
66 virtual void set(U32 index,const SpatialVector& a_vector) =0;
67 virtual void set(U32 index,U32 subIndex,
68  const SpatialVector& a_vector) =0;
69 virtual SpatialVector spatialVector(U32 index,U32 subIndex=0) =0;
70 virtual BWORD spatialVector(SpatialVector* a_pVectorArray,
71  const Vector2i* a_pIndexArray,
72  I32 a_arrayCount) =0;
73 
74 virtual void fragmentWith(SurfaceAccessibleI::Element a_element,
75  String a_attributeName,String a_groupName) =0;
76 virtual U32 fragmentCount(void) const =0;
77 virtual String fragment(U32 a_index) const =0;
78 virtual BWORD filterWith(String a_filterString,
80  a_rspFilter) const =0;
81 
82 virtual SurfaceAccessibleI::Element element(void) =0;
83 virtual SurfaceAccessibleI::Attribute attribute(void) =0;
84 
85 virtual String attributeName(void) =0;
86 
87 virtual void appendGroupSpans(
88  SpannedRange::MultiSpan& a_rMultiSpan) =0;
89 
90 };
91 
92 } /* namespace ext */
93 } /* namespace fe */
94 
95 #endif /* __surface_SurfaceAccessorI_h__ */
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Surface Element Handle.
Definition: SurfaceAccessorI.h:27
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192