Urho3D
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Urho3D::HashBase Class Reference

Hash set/map base class. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Container/HashBase.h>

Inheritance diagram for Urho3D::HashBase:
Urho3D::HashMap< Urho3D::String, Urho3D::SharedPtr< Urho3D::AttributeAnimationInfo > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::AnimationTrack > Urho3D::HashMap< unsigned, Urho3D::SharedPtr< Urho3D::Sprite2D > > Urho3D::HashMap< StringHash, Variant > Urho3D::HashMap< Urho3D::StringHash, Urho3D::Variant > Urho3D::HashMap< Urho3D::Pair< Urho3D::StringHash, Urho3D::StringHash >, Urho3D::BackgroundLoadItem > Urho3D::HashMap< Urho3D::BatchGroupKey, Urho3D::BatchGroup > Urho3D::HashMap< hash32, hash32 > Urho3D::HashMap< hash16, hash16 > Urho3D::HashMap< Urho3D::StringHash, Urho3D::PackageDownload > Urho3D::HashMap< Urho3D::StringHash, Urho3D::PackageUpload > Urho3D::HashMap< unsigned, Urho3D::Vector< byte > > Urho3D::HashMap< int, Urho3D::VectorBuffer > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::ObjectFactory > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::Object > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::Vector< Urho3D::AttributeInfo > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::EventReceiverGroup > > Urho3D::HashMap< Urho3D::Object *, Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::EventReceiverGroup > > > Urho3D::HashMap< Urho3D::String, Urho3D::Vector< Urho3D::StringHash > > Urho3D::HashMap< Urho3D::String, Urho3D::CursorShapeInfo > Urho3D::HashMap< Urho3D::String, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::DbConnection > > > Urho3D::HashMap< Urho3D::String, Urho3D::String > Urho3D::HashMap< Urho3D::String, Urho3D::Timer > Urho3D::HashMap< int, Urho3D::SharedPtr< Urho3D::FontFace > > Urho3D::HashMap< c32, Urho3D::FontGlyph > Urho3D::HashMap< u32, float > Urho3D::HashMap< Urho3D::String, TextureUnit > Urho3D::HashMap< Urho3D::Pair< i8, i8 >, unsigned > Urho3D::HashMap< hash64, Urho3D::FrameBufferObject > Urho3D::HashMap< unsigned, SharedPtr< ConstantBuffer > > Urho3D::HashMap< unsigned, Urho3D::SharedPtr< Urho3D::Texture2D > > Urho3D::HashMap< Pair< ShaderVariation *, ShaderVariation * >, SharedPtr< ShaderProgram_OGL > > Urho3D::HashMap< int, Urho3D::TouchState > Urho3D::HashMap< int, int > Urho3D::HashMap< SDL_JoystickID, Urho3D::JoystickState > Urho3D::HashMap< Urho3D::StringHash, Urho3D::HashMap< Urho3D::StringHash, Urho3D::String > > Urho3D::HashMap< TextureUnit, Urho3D::SharedPtr< Urho3D::Texture > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::MaterialShaderParameter > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::ShaderParameterAnimationInfo > > Urho3D::HashMap< i32, Urho3D::VertexBufferMorph > Urho3D::HashMap< SLNet::AddressOrGUID, Urho3D::SharedPtr< Urho3D::Connection > > Urho3D::HashMap< unsigned, Urho3D::ComponentReplicationState > Urho3D::HashMap< Urho3D::String, Urho3D::SharedPtr< Urho3D::ValueAnimationInfo > > Urho3D::HashMap< String, PListValue > Urho3D::HashMap< Urho3D::String, Urho3D::PackageEntry > Urho3D::HashMap< Urho3D::StringHash, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::ShaderVariation > > > Urho3D::HashMap< Urho3D::Pair< Urho3D::WeakPtr< Urho3D::RigidBody >, Urho3D::WeakPtr< Urho3D::RigidBody > >, Urho3D::ManifoldPair > Urho3D::HashMap< Urho3D::RigidBody *, Urho3D::DelayedWorldTransform > Urho3D::HashMap< Pair< Model *, i32 >, SharedPtr< CollisionGeometryData > > Urho3D::HashMap< Urho3D::RigidBody2D *, Urho3D::DelayedWorldTransform2D > Urho3D::HashMap< int, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::Texture2D > > > Urho3D::HashMap< int, Urho3D::SharedPtr< Urho3D::Texture2D > > Urho3D::HashMap< int, Urho3D::Vector< Urho3D::Light * > > Urho3D::HashMap< hash64, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::Texture > > > Urho3D::HashMap< hash64, i32 > Urho3D::HashMap< Urho3D::Pair< Urho3D::Light *, Urho3D::Camera * >, Urho3D::Rect > Urho3D::HashMap< Urho3D::Camera *, Urho3D::WeakPtr< Urho3D::View > > Urho3D::HashMap< Urho3D::Camera *, Urho3D::ViewBatchInfo2D > Urho3D::HashMap< Urho3D::Texture2D *, Urho3D::HashMap< int, Urho3D::SharedPtr< Urho3D::Material > > > Urho3D::HashMap< int, Urho3D::SharedPtr< Urho3D::Technique > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::ResourceGroup > Urho3D::HashMap< Urho3D::StringHash, Urho3D::HashSet< Urho3D::StringHash > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::Resource > > Urho3D::HashMap< NodeId, Urho3D::Node * > Urho3D::HashMap< ComponentId, Urho3D::Component * > Urho3D::HashMap< Urho3D::StringHash, Urho3D::Vector< Urho3D::Node * > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::String > Urho3D::HashMap< unsigned, Urho3D::NodeReplicationState > Urho3D::HashMap< NodeId, Urho3D::WeakPtr< Urho3D::Node > > Urho3D::HashMap< ComponentId, Urho3D::WeakPtr< Urho3D::Component > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::ShaderVariation > > Urho3D::HashMap< Urho3D::StringHash, Urho3D::ShaderParameter > Urho3D::HashMap< Urho3D::Camera *, Urho3D::Matrix3x4 > Urho3D::HashMap< Urho3D::String, Urho3D::SharedPtr< Urho3D::Sprite2D > > Urho3D::HashMap< StringHash, String > Urho3D::HashMap< Urho3D::Pair< Urho3D::StringHash, Urho3D::StringHash >, Urho3D::SharedPtr< Urho3D::Technique > > Urho3D::HashMap< Urho3D::String, i32 > Urho3D::HashMap< Urho3D::String, Urho3D::SharedPtr< Urho3D::XMLFile > > Urho3D::HashMap< unsigned, Urho3D::SharedPtr< Urho3D::PropertySet2D > > Urho3D::HashMap< unsigned, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::TileMapObject2D > > > Urho3D::HashMap< Urho3D::WeakPtr< Urho3D::UIElement >, bool > Urho3D::HashMap< Urho3D::WeakPtr< Urho3D::UIElement >, Urho3D::UI::DragData * > Urho3D::HashMap< Urho3D::WeakPtr< Urho3D::UIElement >, MouseButtonFlags > Urho3D::HashMap< Urho3D::UIElement *, Urho3D::UI::RenderToTextureData > Urho3D::HashMap< Urho3D::StringHash, Urho3D::Texture * > Urho3D::HashMap< hash64, Urho3D::LightBatchQueue > Urho3D::HashMap< i32, Urho3D::BatchQueue > Urho3D::HashSet< const Urho3D::AttributeInfo * > Urho3D::HashSet< Urho3D::StringHash > Urho3D::HashSet< Urho3D::Pair< Urho3D::StringHash, Urho3D::StringHash > > Urho3D::HashSet< unsigned > Urho3D::HashSet< Urho3D::String > Urho3D::HashSet< int > Urho3D::HashSet< Urho3D::Scene * > Urho3D::HashSet< Urho3D::Octree * > Urho3D::HashSet< Urho3D::Technique * > Urho3D::HashSet< NodeId > Urho3D::HashSet< ComponentId > Urho3D::HashSet< Urho3D::Pair< Urho3D::ShaderVariation *, Urho3D::ShaderVariation * > > Urho3D::HashSet< Urho3D::Drawable * > Urho3D::HashMap< T, U > Urho3D::HashSet< T >

Public Member Functions

 HashBase ()
 Construct.
 
void Swap (HashBase &rhs)
 Swap with another hash set or map.
 
i32 Size () const
 Return number of elements.
 
i32 NumBuckets () const
 Return number of buckets.
 
bool Empty () const
 Return whether has no elements.
 

Static Public Attributes

static constexpr i32 MIN_BUCKETS = 8
 Initial amount of buckets.
 
static constexpr i32 MAX_LOAD_FACTOR = 4
 Maximum load factor.
 

Protected Member Functions

void AllocateBuckets (i32 size, i32 numBuckets)
 Allocate bucket head pointers + room for size and bucket count variables.
 
void ResetPtrs ()
 Reset bucket head pointers.
 
void SetSize (i32 size)
 Set new size.
 
HashNodeBase ** Ptrs () const
 Return bucket head pointers.
 

Protected Attributes

HashNodeBasehead_
 List head node pointer.
 
HashNodeBasetail_
 List tail node pointer.
 
HashNodeBase ** ptrs_
 Bucket head pointers.
 
AllocatorBlockallocator_
 Node allocator.
 

Detailed Description

Hash set/map base class.

Note that to prevent extra memory use due to vtable pointer, HashBase intentionally does not declare a virtual destructor and therefore HashBase pointers should never be used.


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