7 #ifndef __data_LayoutSB_h__ 8 #define __data_LayoutSB_h__ 48 typedef FE_UWORD Offset;
52 class OffsetTable :
public Counted 59 Offset *table(
void) {
return m_table; }
61 void resize(
unsigned int a_size);
65 std::vector< hp<LayoutSB> > m_layouts;
69 friend class LayoutSB::OffsetTable;
75 virtual void initialize(
void);
78 virtual void populate(
const String &attribute_name);
80 virtual void populate(
const String &attribute_name,
81 const String &attribute_type);
91 virtual void setName(
const String &name);
92 virtual const String& name(
void)
const;
93 virtual const String verboseName(
void)
const;
95 #ifdef FE_LOCK_SUPPRESSION 98 void suppressLock(
bool suppression);
99 bool lockSuppressed(
void)
const;
102 virtual void setConstruct(
bool construct);
103 virtual const bool &construct(
void)
const;
107 virtual void peek(Peeker &peeker);
109 virtual FE_UWORD attributeCount(
void)
const {
return (FE_UWORD)0;}
114 virtual bool checkAttribute(FE_UWORD aLocator)
const;
115 virtual bool checkAttributeStr(
const String &a_name);
116 virtual void resizeLocatorTable(FE_UWORD aSize);
121 virtual void notifyOfAttributeChange(
sp<Depend> &depend);
124 void setOffsetTable(Offset *offset_table);
125 const Offset *offsetTable(
void)
const;
126 const Offset *rawOffsetTable(
void)
const;
127 void setSize(
const FE_UWORD record_size);
129 FE_UWORD size(
void)
const;
131 void setLocked(
bool locked);
132 const bool &locked(
void)
const;
138 void constructAttributes(
void *stateBlock);
139 void destructAttributes(
void *stateBlock);
145 void cacheIndices(
void);
146 void setOffset(
const FE_UWORD index,
const Offset offset);
148 unsigned int serialIndex(
void)
const {
return m_serialIndex; }
158 std::vector<FE_UWORD> m_offsetIndex;
161 unsigned int m_serialIndex;
165 const FE_DL_PUBLIC Offset offsetNone = 0xFFFFFFFF;
169 #if FE_DATA_STORE==FE_SB 173 inline bool LayoutSB::checkAttribute(FE_UWORD aLocator)
const 175 return (offsetTable()[aLocator] != offsetNone);
178 inline void LayoutSB::setName(
const String &name)
183 inline const String& LayoutSB::name(
void)
const 188 inline const String LayoutSB::verboseName(
void)
const 190 return "LayoutSB " + name();
193 inline const bool &LayoutSB::locked(
void)
const 199 inline void LayoutSB::setConstruct(
bool construct)
202 m_construct = construct;
204 inline const bool &LayoutSB::construct(
void)
const 211 inline void LayoutSB::setSize(
const FE_UWORD size)
223 inline void LayoutSB::setOffsetTable(LayoutSB::Offset *offset_table)
226 m_pTable = offset_table;
229 inline const LayoutSB::Offset *LayoutSB::offsetTable(
void)
const 232 #if FE_CODEGEN<=FE_DEBUG 235 feX(
"LayoutSB::offsetTable",
236 "layout not locked");
242 inline const LayoutSB::Offset *LayoutSB::rawOffsetTable(
void)
const 249 inline void LayoutSB::setOffset(
const FE_UWORD index,
const LayoutSB::Offset offset)
251 m_pTable[index] = offset;
Class level locking for thread safety.
Definition: Safe.h:213
Memory manager for state blocks.
Definition: SegmentStore.h:17
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
FE_UWORD size(void) const
Size of an instance of the layout.
Definition: LayoutSB.h:216
Type inspecific Accessor.
Definition: Accessor.h:26
Safe handle for shared pointer.
Definition: Handled.h:61
Automatically reference-counted string container.
Definition: String.h:128
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Record "type" definition.
Definition: LayoutSB.h:32
Layout namespace.
Definition: Scope.h:71
Record "type" definition.
Definition: LayoutAV.h:30
Homogeneous collection of Records.
Definition: RecordArraySB.h:40
Non-persistent reference to an instance of a Layout.
Definition: WeakRecordSB.h:17