7 #ifndef __data_Depend_h__ 8 #define __data_Depend_h__ 34 e_null = (FE_UWORD)(0),
35 e_available = (FE_UWORD)(1<<0),
36 e_attribute = (FE_UWORD)(1<<1),
37 e_populate = (FE_UWORD)(1<<2),
38 e_share = (FE_UWORD)(1<<3),
39 e_within = (FE_UWORD)(1<<4)
51 m_attributeName(attributeName),
62 m_attributeName = other.m_attributeName;
63 m_attributeType = other.m_attributeType;
64 m_depName = other.m_depName;
65 m_depFlag = other.m_depFlag;
66 m_shareName = other.m_shareName;
67 m_matchAttributes = other.m_matchAttributes;
79 m_attributeName = other.m_attributeName;
80 m_attributeType = other.m_attributeType;
81 m_depName = other.m_depName;
82 m_depFlag = other.m_depFlag;
83 m_shareName = other.m_shareName;
84 m_matchAttributes = other.m_matchAttributes;
91 if(m_attributeName != other.m_attributeName) {
return false; }
92 if(m_attributeType != other.m_attributeType) {
return false; }
93 if(m_depName != other.m_depName) {
return false; }
94 if(m_shareName != other.m_shareName) {
return false; }
95 if(m_depFlag != other.m_depFlag) {
return false; }
96 if(!(m_matchAttributes == other.m_matchAttributes))
98 if(m_matchAttributes.size() != other.m_matchAttributes.size())
102 std::set<String> a, b;
103 for(
unsigned int i = 0; i < m_matchAttributes.size(); i++)
105 a.insert(m_matchAttributes[i]);
107 for(
unsigned int i = 0; i < other.m_matchAttributes.size(); i++)
109 b.insert(other.m_matchAttributes[i]);
119 void peek(Peeker &peeker);
121 String &attributeName(
void) {
return m_attributeName; }
122 String &attributeType(
void) {
return m_attributeType; }
123 String &dependName(
void) {
return m_depName; }
124 String &shareName(
void) {
return m_shareName; }
125 size_t &offset(
void) {
return m_offset; }
126 FE_UWORD &dependFlag(
void) {
return m_depFlag; }
128 &matchAttributes(
void) {
return m_matchAttributes; }
130 const String &name(
void)
const {
return m_attributeName; }
131 const String verboseName(
void)
const 132 {
return "Depend " + m_attributeName +
" on " + m_depName; }
144 inline void Depend::peek(Peeker &peeker)
146 peeker.str().catf(
"attribute:%s type:%s dep:%s share:%s flags:",
147 m_attributeName.c_str(),
148 m_attributeType.c_str(),
150 m_shareName.c_str());
151 if(m_depFlag & e_available)
153 peeker.cat(
" available");
155 if(m_depFlag & e_attribute)
157 peeker.cat(
" attribute");
159 if(m_depFlag & e_populate)
161 peeker.cat(
" populate");
163 if(m_depFlag & e_share)
165 peeker.cat(
" share");
167 if(m_depFlag & e_within)
169 peeker.cat(
" within");
172 for(
unsigned int i = 0; i < m_matchAttributes.size(); i++)
175 peeker.cat(m_matchAttributes[i]);
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
Base participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:93
Attribute dependency information.
Definition: Depend.h:28
kernel
Definition: namespace.dox:3
BWORD operator==(const DualString &s1, const DualString &s2)
Compare two DualString's.
Definition: DualString.h:208
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21