Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Working with the oda:mark Tag

The <oda:mark> tag places a value by key in the cache. The value is not written to the cache itself. A condition that processes the event by key that is defined by the <oda:mark> tag must have an oda:isMarkCondition="" attribute. This tag has two required attributes:

  • name="name" — Key for the value in the cache.
  • oda:setCondition="true" — Bool value that controls writing/rewriting the value to the cache.

For example:


bool bUse = false;
int i = pFiler->rdInt32();
while ( i-- )
{
  int iUndef = pFiler->rdInt32();
  if( iUndef & 4)
  {
    bUse =  true;
  }
}
If(bUse)
{
  dUndef = pFiler->rdDouble();
}

<xs:element name="i " type="xs:int" oda:isArrayLength=""/>
<oda:array name= "i">
  <xs:element name="iUndef" type="xs:int " oda:isCondition=""/>
  <oda:condition name="iUndef" oda:conditionValue="*4">
    <oda:mark name="bUse" oda:setCondition="true ">
  </oda:condition>
</oda:array>
<oda:condition name="bUse" oda:conditionValue="true" oda:isMarkCondition="">
  <xs:element name="dUndef " type="xs:double"/>
</oda:condition>

This example shows that bUse is not read from the data stream. It gets its value depending on the result of the previous condition. The next <oda:condition> tag has an oda:isMarkCondition="" attribute set because it uses bUse.

Note: The <oda:mark> tag can only set bool values (true/false).

See Also

Working with the XML Scheme for Revision Control

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.