Using KosObject containers (objcontainer.h, objcontainernolock.h, basecontainer.h)

The APIs let you merge KosObjects into containers to conveniently use sets of these objects (for details about KosObjects, see Using KosObjects (objects.h)). The containers are also KosObjects and may be elements of other containers. The same KosObject may be an element of multiple containers at the same time.

Each API is intended for the use of various types of containers. The specific characteristics of each type of container are presented in the table below.

Specific characteristics of container types

Type name

Type characteristics

KosObjContainer

  • Objects have names within a container.
  • The same object may be added to a container multiple times with different names.
  • Operations performed with objects are thread-safe.

KosObjContainerNolock

  • Objects have names within a container.
  • The same object may be added to a container multiple times with different names.
  • Operations performed with objects are not thread-safe.

KosBaseContainer

  • Objects do not have names within a container.
  • The same object cannot be added to a container multiple times.
  • Operations performed with objects are not thread-safe.

In this section

Using KosObjContainers (objcontainer.h)

Using KosObjContainerNolock (objcontainernolock.h)

Using KosBaseContainers (basecontainer.h)

Page top