Add an attribute to the visible entity
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdsVE::AddAttr | (hzString&,hzString&,) |
Declared in file: hzDissemino.h
Defined in file : hdsCore.cpp
Function Logic:
Function body:
hzEcode hdsVE::AddAttr (hzString& name)hzString& value,
{
// Category: Dissemino System Initialization
//
// Add an attribute to the visible entity
//
_hzfunc("hdsVE::AddAttr") ;
const char* i ; // Attribute value iterator
hzString pcntEnt ; // Percent entity
// hzFixPair pa ; // Attribute
hzPair pa ; // Attribute
hzEcode rc = E_OK ; // Return code
if (!m_pApp)
return E_CORRUPT ;
// Check attribute for impact on flags: Does it make the tag active?
for (i = *value ; *i ; i++)
{
if (*i != CHAR_PERCENT)
continue ;
if (i[1]== CHAR_PERCENT)
{ i++ ; continue ; }
if (IsAlpha(i[1])&& i[2]== CHAR_COLON)
{
if (m_pApp->IsPcEnt(pcntEnt, i))
m_flagVE |= VE_AT_ACTIVE ;
else
{ rc = E_FORMAT ; break ; }
i += 2;
}
}
// Add the attribute
pa.name = name ;
pa.value = value ;
m_nAttrs++ ;
rc = m_pApp->m_VE_attrs.Insert(m_VID, pa) ;
return rc ;
}