PxOpoolResolveDefault()

Resolve an object pool default.

APPLIES TO

8.2.0

SYNOPSIS
PxOpool_t PxOpoolResolveDefault (PxOpool_t opoolid);
ARGUMENTS
opoolid

An object pool id

RETURN VALUES
  • Object pool id

ERROR CODES

PXERR_OPOOL_ILLOPOOL

opoolid is not a valid object pool id

DESCRIPTION

PxOpoolResolveDefault resolves an object pool default. More precisely, it returns opoolid if opoolid is not PXOpoolSystemdefault or PXOpoolTaskdefault. Otherwise, it returns the object pool id corresponding to the specified default.

IMPLEMENTATION GUIDELINES
Before call
  • opoolid must be:

    • a valid PXROS-HR object pool created with a PxOpoolRequest call (V). The validity of opoolid may also be checked by the PxOpoolIsValid macro (F).

    • the symbolic value PXOpoolSystemdefault specifying the system object pool(V)

    • the symbolic value PXOpoolTaskdefault specifying the task’s object pool(V)

After call
  • The returned value is the id of type PxOpool_t. This id may be checked with one of the following macros:

  • PxopoolidIsValid() must be true.

  • PxopoolidGet() must not be _PXIllegalObjId.

  • PxopoolidError() must be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

    • PxopoolidIsValid() must be true.

    • PxopoolidGet() must not be _PXIllegalObjId.

    • PxopoolidError() must be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

Best Practice
  • No restrictions.

SEE ALSO
USAGE
#include "pxdef.h"

PxOpool_t RetOpool = PxOpoolResolveDefault(opoolid);

if (PxopoolidError(RetOpool) != PXERR_NOERROR) {
    // Report error
}