3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
UniqueIDHandler Class Reference

A class to manage "tear-off" ID values, to allow for indexing without knowing position. More...

#include <basics.h>

Public Member Functions

unsigned int genId (unsigned int position)
 Generate a unique ID value, storing the position ID pair. More...
 
void killByPos (unsigned int position)
 Remove a uniqueID using its position. More...
 
unsigned int getPos (unsigned int id) const
 Get the position from its unique ID. More...
 
unsigned int getId (unsigned int pos) const
 Get the uniqueID from the position. More...
 
void getIds (std::vector< unsigned int > &idvec) const
 Get all unique IDs. More...
 
void clear ()
 Clear the mapping. More...
 
unsigned int size () const
 Get the number of elements stored. More...
 

Detailed Description

A class to manage "tear-off" ID values, to allow for indexing without knowing position.

Member Function Documentation

◆ clear()

void UniqueIDHandler::clear ( )

Clear the mapping.

Referenced by Scene::clearEffects(), and StashDialog::OnTreeSelChange().

Here is the caller graph for this function:

◆ genId()

unsigned int UniqueIDHandler::genId ( unsigned int  position)

Generate a unique ID value, storing the position ID pair.

References ASSERT.

Referenced by Scene::addEffect().

Here is the caller graph for this function:

◆ getId()

unsigned int UniqueIDHandler::getId ( unsigned int  pos) const

Get the uniqueID from the position.

References ASSERT.

◆ getIds()

void UniqueIDHandler::getIds ( std::vector< unsigned int > &  idvec) const

Get all unique IDs.

◆ getPos()

unsigned int UniqueIDHandler::getPos ( unsigned int  id) const

Get the position from its unique ID.

References ASSERT.

Referenced by Scene::removeEffect().

Here is the caller graph for this function:

◆ killByPos()

void UniqueIDHandler::killByPos ( unsigned int  position)

Remove a uniqueID using its position.

Referenced by Scene::removeEffect().

Here is the caller graph for this function:

◆ size()

unsigned int UniqueIDHandler::size ( ) const
inline

Get the number of elements stored.

References getAvailRAM(), getFilesize(), getTotalRAM(), isNotDirectory(), and rmFile().

Referenced by Scene::addEffect().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: