7 #ifndef __surface_SurfaceAccessibleBase_h__ 8 #define __surface_SurfaceAccessibleBase_h__ 30 virtual BWORD
isBound(
void) {
return FALSE; }
35 { m_spThreadingState=a_spThreadingState; }
39 virtual void lock(I64 a_id);
42 virtual void unlock(I64 a_id);
54 SurfaceAccessibleI::Element
56 { a_rNameArray.clear(); }
61 virtual void attributeSpecs(
64 SurfaceAccessibleI::Element
66 { attributeSpecs(a_rSpecs,
"",a_element); }
67 virtual void attributeSpecs(
71 SurfaceAccessibleI::Element
74 virtual void clear(
void) { reset(); }
76 virtual I32 count(
String a_node,
77 SurfaceAccessibleI::Element
79 virtual I32 count(SurfaceAccessibleI::Element
81 {
return count(
"",a_element); }
89 Creation a_create,Writable a_writable)
95 Attribute a_attribute,
96 Creation a_create,Writable a_writable)
104 {
return accessor(a_node,a_element,a_name,
105 a_create,e_readOnly); }
108 Attribute a_attribute,
110 {
return accessor(a_node,
111 a_element,a_attribute,
112 a_create,e_readOnly); }
116 {
return accessor(
"",a_element,a_name,
117 a_create,e_readOnly); }
120 Attribute a_attribute,
122 {
return accessor(
"",a_element,a_attribute,
123 a_create,e_readOnly); }
126 {
return accessor(a_element,a_name,
130 Attribute a_attribute)
131 {
return accessor(a_element,a_attribute,
134 virtual I32 discardPattern(
135 SurfaceAccessibleI::Element a_element,
137 virtual BWORD discard(SurfaceAccessibleI::Element a_element,
139 virtual BWORD discard(SurfaceAccessibleI::Element a_element,
140 SurfaceAccessibleI::Attribute
144 {
return surface(
String(),
145 SurfaceI::e_unrestricted); }
147 {
return surface(a_group,
148 SurfaceI::e_unrestricted); }
150 SurfaceI::Restrictions a_restrictions);
153 {
return subSurface(a_subIndex,
String(),
154 SurfaceI::e_unrestricted); }
156 {
return subSurface(a_subIndex,a_subIndex,
157 SurfaceI::e_unrestricted); }
159 SurfaceI::Restrictions a_restrictions);
162 a_spSurfaceAccessible)
164 append(a_spSurfaceAccessible,NULL); }
167 a_spSurfaceAccessible,
171 append(a_spSurfaceAccessible,a_nodeName,
175 a_spSurfaceAccessible,
178 append(a_spSurfaceAccessible,
182 a_spSurfaceAccessible,
187 a_spSurfaceAccessible,
190 { append(a_spSurfaceAccessible,
194 a_spSurfaceAccessible,
202 a_spSurfaceAccessible,
209 String a_group,U32 a_desiredCount);
212 String a_group,U32 a_desiredCount,
215 virtual void setPaging(BWORD a_paging)
216 { m_paging=a_paging; }
217 virtual BWORD paging(
void)
const {
return m_paging; }
219 virtual void preparePaging(AtomicChange a_atomicChange,
221 virtual I32 pointPage(U32 a_pointIndex)
const 223 virtual I32 primitivePage(U32 a_primitiveIndex)
const 227 a_rStringArray)
const;
229 static String elementLayout(
230 SurfaceAccessibleI::Element a_element);
231 static String attributeString(SurfaceAccessibleI::Attribute
234 String findNameAttribute(
void);
236 void setAttributeToDefault(Element a_element,
237 I32 a_start,I32 a_count,
238 const Spec& a_rSpec);
242 static BWORD specsContain(
const Array<Spec>& a_rSpecs,
243 const Spec& a_rSpec);
245 class FE_DL_EXPORT MultiGroup:
251 m_iterator(m_indices.begin()),
252 m_currentPosition(0) {}
253 virtual ~MultiGroup(
void) {}
255 BWORD contains(I32 a_index)
const 256 {
return m_indices.find(a_index) !=
259 U32 count(
void)
const {
return m_indices.size(); }
260 I32 at(I32 a_position);
261 void insert(I32 a_index)
263 m_indices.insert(a_index);
264 m_iterator=m_indices.begin();
267 void insert(I32 a_first,I32 a_last)
269 for(I32 index=a_first;index<=a_last;index++)
270 { m_indices.insert(index); }
271 m_iterator=m_indices.begin();
274 void insert(std::set<I32>& a_rIntSet)
276 for(I32 index: a_rIntSet)
277 { m_indices.insert(index); }
278 m_iterator=m_indices.begin();
281 void erase(I32 a_index)
283 m_indices.erase(a_index);
284 m_iterator=m_indices.begin();
287 void erase(I32 a_first,I32 a_last)
289 for(I32 index=a_first;index<=a_last;index++)
290 { m_indices.erase(index); }
291 m_iterator=m_indices.begin();
294 virtual void add(I32 a_index) { insert(a_index); }
295 virtual void remove(I32 a_index) { erase(a_index); }
298 std::set<I32> m_indices;
299 std::set<I32>::iterator m_iterator;
300 I32 m_currentPosition;
304 virtual I32 deleteElements(
305 SurfaceAccessibleI::Element a_element,
307 BWORD a_retainGroups);
309 virtual I32 deleteElements(
310 SurfaceAccessibleI::Element a_element,
311 std::set<I32>& a_rIntSet,
312 BWORD a_retainGroups);
314 virtual I32 deleteElements(
315 SurfaceAccessibleI::Element a_element,
318 BWORD a_retainGroups);
322 SurfaceAccessibleI::Element a_element,
326 SurfaceAccessibleI::Element a_element,
329 SurfaceAccessibleI::Element a_element,
334 std::map<String, sp<MultiGroup> >& groupMap(
335 SurfaceAccessibleI::Element a_element);
338 virtual void reset(
void);
343 SurfaceAccessibleI::Threading threading(
void)
const 345 if(m_spThreadingState.isNull())
347 return SurfaceAccessibleI::e_unknown;
350 m_spThreadingState->threading());
353 void outlineClear(
void);
354 void outlineAppend(
String a_line);
355 void outlineCreateDefault(
void);
367 std::map<String, sp<MultiGroup> > m_pointGroupMap;
368 std::map<String, sp<MultiGroup> > m_primitiveGroupMap;
372 SurfaceAccessibleI::Element a_element,std::set<I32>& a_rIntSet,
373 BWORD a_retainGroups)
379 if(!a_rIntSet.size())
385 if(spMultiGroup.isNull())
387 feLog(
"SurfaceAccessibleBase::deleteElements MultiGroup NULL\n");
391 spMultiGroup->insert(a_rIntSet);
393 return deleteElements(a_element,spMultiGroup,a_retainGroups);
Common Functionality for Accessible Surface.
Definition: SurfaceAccessibleBase.h:20
Surface Element Access and Alteration.
Definition: SurfaceAccessibleI.h:22
virtual sp< SurfaceI > surface(void)
Return current underlying SurfaceI.
Definition: SurfaceAccessibleBase.h:143
virtual void unlock(void)
Finish a thread-unsafe action.
Definition: SurfaceAccessibleBase.h:43
virtual void bind(sp< SurfaceAccessibleI::ThreadingState > a_spThreadingState)
Inform threading intentions.
Definition: SurfaceAccessibleBase.h:33
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
kernel
Definition: namespace.dox:3
virtual I32 deleteElements(SurfaceAccessibleI::Element a_element, String a_groupString, BWORD a_retainGroups)
Remove elements from surface.
Definition: SurfaceAccessibleBase.cc:747
virtual void bind(sp< Scope > a_scope)
choose a data scope
Definition: SurfaceAccessibleBase.h:32
virtual BWORD isBound(void)
Return true if surface is available.
Definition: SurfaceAccessibleBase.h:30
virtual BWORD threadable(void)
Indicate whether an implementation can be accessed from multiple threads.
Definition: SurfaceAccessibleBase.h:37
virtual void bind(Instance a_instance)
associate with model data
Definition: SurfaceAccessibleBase.h:31
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21
virtual void lock(void)
Start a thread-unsafe action.
Definition: SurfaceAccessibleBase.h:40
virtual BWORD save(String a_filename)
save model data to file
Definition: SurfaceAccessibleBase.h:48
virtual BWORD save(String a_filename, sp< Catalog > a_spSettings)
save model data with settings
Definition: SurfaceAccessibleBase.h:50
virtual sp< SurfaceAccessorI > accessor(String a_node, SurfaceAccessibleI::Element a_element, String a_name, SurfaceAccessibleI::Creation a_create, SurfaceAccessibleI::Writable a_writable)=0
Return access to an attribute.
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192
Object level locking for thread safety.
Definition: SafeShared.h:220
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