Free Electron
Layout.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 __data_Layout_h__
8 #define __data_Layout_h__
9 
10 namespace fe
11 {
12 
13 class Scope;
14 class BaseAccessor;
15 
16 class FE_DL_EXPORT Layout: public Component, public CastableAs<Layout>
17 {
18  public:
19  Layout(void) : Component() {}
20 virtual ~Layout(void);
21 
22 virtual void initialize(void) {}
23 
24  /** Convienience function to Scope::populate */
25 virtual void populate(const String &attribute_name) = 0;
26  /** Convienience function to Scope::populate */
27 virtual void populate(const String &attribute_name,
28  const String &attribute_type) = 0;
29  /** Convienience function to Scope::populate. This particular one
30  does a check if the layout is locked and if so verifys the
31  exsitence of the attribute. */
32 virtual void populate(const BaseAccessor &accessor) = 0;
33  /** Convienience function to Scope::populate */
34 virtual void populate(sp<Attribute> spAttribute) = 0;
35 
36 virtual void setName(const String &name) = 0;
37 virtual const String& name(void) const = 0;
38 virtual const String verboseName(void) const = 0;
39 
40 virtual void setConstruct(bool construct) = 0;
41 virtual const bool &construct(void) const = 0;
42 
43 virtual hp<Scope>& scope(void) = 0;
44 
45 
46 virtual void peek(Peeker &peeker) = 0;
47 
48 virtual FE_UWORD attributeCount(void) const = 0;
49 virtual sp<Attribute> attribute(FE_UWORD localIndex) = 0;
50 
51 virtual bool checkAttribute(FE_UWORD a_locator) const = 0;
52 virtual bool checkAttributeStr(const String &a_name) = 0;
53 virtual void resizeLocatorTable(FE_UWORD a_size) = 0;
54 
55 virtual void notifyOfAttributeChange(sp<Depend> &depend) = 0;
56 
57 virtual bool isExactlyBitset(const t_bitset a_bitset) = 0;
58 virtual bool containsBitset(const t_bitset a_bitset) = 0;
59 
60  const t_bitset &bitset(void) const { return m_bitset; }
61  void setBitset(const t_bitset &a_bs) { m_bitset = a_bs; }
62 
63  private:
64  t_bitset m_bitset;
65 
66 };
67 
68 } /* namespace */
69 
70 #endif /* __data_Layout_h__ */
71 
kernel
Definition: namespace.dox:3