[Connect U12 C++] XAttributeIter missing?

In v8i ElemHandle::XAttributeIter got used but under CE U12 ElementHandle::XAttributeIter  I get an error thats its no part of ElementHandle. In XAttributeIter.h  ElementHandle::XAttributeIter is mentioned but no implementation or do I overlook something?

Parents
  • In v8i ElemHandle::XAttributeIter

    As Jan wrote, CONNECT has the XAttributeCollection that you construct from an ElementRef.

    XAttributeCollection provides the begin() and end() methods like any of the C++ standard collection classes...

    XAttributeCollection attributes (elemRef);
    for (auto& entry = attributes.begin(); entry != attributes.end(); ++entry)
    {
      ... do something with attribute
    }

    C++ Standard Collection Classes

    Many interfaces in the MicroStationAPI either implement the C++ collection classes or emulate the essential functionality for enumeration.

    A good example is the Bentley vector template bvector<>. It is a C++ standard vector template class.

    It has certain characteristics that make it safe to use in your apps. when working with MicroStation built-in functions. As far as you — the programmer — are concerned, it behaves just like a std::vector<>.  There's more info in this article.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jean-Pierre Hundhausen 

Reply
  • In v8i ElemHandle::XAttributeIter

    As Jan wrote, CONNECT has the XAttributeCollection that you construct from an ElementRef.

    XAttributeCollection provides the begin() and end() methods like any of the C++ standard collection classes...

    XAttributeCollection attributes (elemRef);
    for (auto& entry = attributes.begin(); entry != attributes.end(); ++entry)
    {
      ... do something with attribute
    }

    C++ Standard Collection Classes

    Many interfaces in the MicroStationAPI either implement the C++ collection classes or emulate the essential functionality for enumeration.

    A good example is the Bentley vector template bvector<>. It is a C++ standard vector template class.

    It has certain characteristics that make it safe to use in your apps. when working with MicroStation built-in functions. As far as you — the programmer — are concerned, it behaves just like a std::vector<>.  There's more info in this article.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jean-Pierre Hundhausen 

Children
No Data