This template interface provides the necessary abstract methods which allow the user to access the current Archicad database through the API as if it were a real container object.
template <typename APIType, typename FilterType, class Iterator> class GSAPI::IAPIPseudoContainer;
Template parameters
- APIType
- The element type of the container.
- FilterType
- The type of the element filter (API_ElemFilter or GSAPI::AttributeFilter in the implementations in the DefaultImplementations folder).
- Iterator
- The type of the iterator returned by the container (which must be derived from the IAPIPseudoIterator interface).
Description
The interface is called PseudoContainer because for once it doesn’t contain anything, but forwards the element accessor calls to the API; and for twice because it defines the order of element access through it’s GetNext () method instead of the usual way of the iterator deciding on how to access the next element. It exports a Begin () and an End () method which return IAPIPseudoIterators referencing the first and one past the last elements in the “container”. It also supports the filtering of the database elements with a SetFilter () method. The container also holds an optional pointer to an IAPIAttributeAdapterFactory object.
There are 4 different implementations in the DefaultImplementation folder:
- AttributeProxy is a special container, which indeed contains the attributes it proxies.
- CreationOrderElementContainer returns the elements in growing creation time order.
- DrawOrderElementContainer returns the elements in drawing order.
- IndexedElementContainer returns the elements in the order of their type and element index.
It is possible to use these containers independent of the framework (on their own – together with the iterator type of course).
See also IAPIPseudoContainer and IAPIPseudoIterator implementation details.
Requirements
Namespace: GSAPI
Header: IAPIPseudoContainer.hpp
Version: API 10.21 or later
See Also
IAPIPseudoIterator interface | IAttributeProxy interface | Implementation details