7 #ifndef __data_Scope_h__ 8 #define __data_Scope_h__ 10 #define FE_SCOPE_SUPPORT_WATCHERS FALSE 11 #define FE_SCOPE_GETRECORD FALSE 21 typedef AutoHashMap< String, Array<String> > StringStringsMap;
22 typedef AutoHashMap< hp<Layout>, sp<StoreI> > layout_store_map;
30 #if FE_SCOPE_SUPPORT_WATCHERS 32 typedef std::list<sp<WatcherI> > t_watchers;
34 typedef std::map<String, unsigned int> t_indexmap;
35 typedef std::map<Attribute *, unsigned int> t_attrmap;
40 class OffsetTable :
public Counted 47 Offset *table(
void) {
return m_table; }
49 void resize(
unsigned int a_size);
95 virtual void setName(
const String& name);
99 void initialize(
void);
104 void layoutValidate(
void);
108 { m_locking=a_locking; }
109 BWORD isLocking(
void)
110 {
return m_locking; }
149 void registerFactory(
String name,
154 void finalize(
Record& rRecord);
174 FE_UWORD getAttributeCount(
void)
const;
191 bool enforce(
const String &ifHas,
197 bool populate(
const String &ifIs,
207 bool share(
const String &ifIs,
212 bool within(
const String &ifIs,
215 const size_t &offset);
218 void clonePopulate(
const String &ifThisHas,
219 const String &thenThisDoes);
227 void resizeLayoutLocators(
void)
const;
236 #if FE_SCOPE_SUPPORT_WATCHERS 242 void peek(Peeker &peeker);
244 U32 serialIndex(
void) {
return m_serialIndex; }
245 template <
typename R>
246 void assignIDNumber(
const R &record);
247 template <
typename R>
248 void freeIDNumber(
const R &r_old);
251 FE_UWORD getNextUniqueLayoutID(
void)
252 {
return m_nextUniqueLayoutID++;}
254 FE_UWORD getNextUniqueIDR(
void)
255 {
return m_nextUniqueIDR++;}
257 #if FE_SCOPE_GETRECORD 258 Record getRecord( IWORD
id);
265 t_attributes &attributes(
void);
267 t_layouts &layouts(
void);
269 t_depends &depends(
void);
281 const String &attributeName);
283 const String &attributeName);
287 void notifyLayoutsOfAttributeChange(
290 #if FE_SCOPE_SUPPORT_WATCHERS 291 void watch(
const Record &record);
292 void unwatch(
const Record &record);
298 t_attributes m_attributes;
299 t_indexmap m_indexmap;
302 #if FE_SCOPE_SUPPORT_WATCHERS 303 t_watchers m_watchers;
310 std::set<AccessorSet *> m_accessorSets;
322 #if FE_SCOPE_GETRECORD 333 eq_string > StringRecordFactoryMap;
335 StringRecordFactoryMap m_factoryMap;
336 StringStringsMap& factoryMultiMap(
void);
339 FE_UWORD m_nextUniqueLayoutID;
340 FE_UWORD m_nextUniqueIDR;
347 return m_spTypeMaster;
367 return m_spAllocator;
sp< Allocator > allocator(void)
Direct access to the allocator.
Definition: Scope.h:365
Object level locking for thread safety.
Definition: Safe.h:216
Set of accessors.
Definition: AccessorSet.h:18
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
kernel
Definition: namespace.dox:3
sp< TypeMaster > typeMaster(void)
Return the associated TypeMaster.
Definition: Scope.h:345
std::list< sp< Depend > > t_depends
Depend collection.
Definition: Scope.h:27
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
The main data access class for the data system.
Definition: Accessor.h:128
t_depends & depends(void)
Direct access to the depend list.
Definition: Scope.h:360
Array< hp< Layout > > t_layouts
Layout collection.
Definition: Scope.h:29
Array< sp< Attribute > > t_attributes
Attribute collection.
Definition: Scope.h:25
t_attributes & attributes(void)
Direct access to the attribute table.
Definition: Scope.h:350
Automatically reference-counted string container.
Definition: String.h:128
void setLocking(BWORD a_locking)
Specify if select methods should be protected with a mutex.
Definition: Scope.h:107
Wrapper for std::vector.
Definition: Array.h:21
Reference to an instance of a Layout.
Definition: RecordSB.h:35
t_layouts & layouts(void)
Direct access to the layout table.
Definition: Scope.h:355
Base for all interfacable components.
Definition: Component.h:20
Layout namespace.
Definition: Scope.h:71
Central access point for key pseudo-global objects.
Definition: Master.h:21