PStoreIterator Class Reference

Detailed Description

The PStoreIterator class is an iterator on a PStore container; can be used to get PObject stored on a database.

Definition at line 28 of file PStoreIterator.h.

#include <PStoreIterator.h>

Constructor & Destructor Documentation

◆ PStoreIterator() [1/2]

PStoreIterator::PStoreIterator ( )

Creates an invalid/empty iterator.

Use PStore::Iterator() to get an iterator for a specific PStore.

◆ PStoreIterator() [2/2]

PStoreIterator::PStoreIterator ( const PStoreIterator other)

Constructs a shared copy of other.

◆ ~PStoreIterator()

virtual PStoreIterator::~PStoreIterator ( )
virtual

Destroys this object.

Member Function Documentation

◆ Get()

PResult PStoreIterator::Get ( PObject object) const

Returns the current object associated with the entity pointed by this iterator.

If a sub-class of PObject is used as argument, then performs the cast and returns PResult::C_OK if success, or bad cast error if failure.

◆ GetEntity()

PEntity PStoreIterator::GetEntity ( ) const

Returns the current entity pointed by this iterator.

Returns an invalid entity (PEntity::IsValid()) if iterator has no more elements.

◆ GetEntityId()

PGuid PStoreIterator::GetEntityId ( ) const

Returns true the current entity id pointed by this iterator.

Returns an invalid id (PGuid::IsValid()) if iterator has no more elements.

◆ IsDeleted()

bool PStoreIterator::IsDeleted ( ) const

Returns true if the entity pointed by this iterator is marked as 'deleted', false otherwise.

◆ Next()

PResult PStoreIterator::Next ( )

Moves this iterator to the next entity (PObject) stored in the PStore.

Returns PResult::C_OK if success, another result otherwise (e.g. end of container has been reached).

◆ operator=()

PStoreIterator& PStoreIterator::operator= ( const PStoreIterator other)

Performs a shared copy of other to this object.