U3D
Open-source, cross-platform 2D and 3D game engine built in C++
|
Hash set/map base class. More...
#include </var/dev/u3d/stable/Source/Urho3D/Container/HashBase.h>
Inherited by 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< unsigned, unsigned >, Urho3D::HashMap< unsigned short, unsigned short >, Urho3D::HashMap< Urho3D::String, Urho3D::CScriptDictValue >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::PackageDownload >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::PackageUpload >, Urho3D::HashMap< unsigned, Urho3D::PODVector< unsigned char > >, 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< unsigned, Urho3D::FontGlyph >, Urho3D::HashMap< unsigned, float >, Urho3D::HashMap< Urho3D::String, TextureUnit >, Urho3D::HashMap< Urho3D::Pair< unsigned char, unsigned char >, unsigned >, Urho3D::HashMap< unsigned long long, Urho3D::FrameBufferObject >, Urho3D::HashMap< unsigned, SharedPtr< ConstantBuffer > >, Urho3D::HashMap< unsigned, Urho3D::SharedPtr< Urho3D::Texture2D > >, Urho3D::HashMap< Pair< ShaderVariation *, ShaderVariation * >, SharedPtr< ShaderProgram > >, 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< const void *, Urho3D::SharedPtr< Urho3D::LuaFunction > >, Urho3D::HashMap< Urho3D::String, Urho3D::SharedPtr< Urho3D::LuaFunction > >, Urho3D::HashMap< TextureUnit, Urho3D::SharedPtr< Urho3D::Texture > >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::MaterialShaderParameter >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::SharedPtr< Urho3D::ShaderParameterAnimationInfo > >, Urho3D::HashMap< unsigned, 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 *, unsigned >, 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::PODVector< Urho3D::Light * > >, Urho3D::HashMap< unsigned long long, Urho3D::Vector< Urho3D::SharedPtr< Urho3D::Texture > > >, Urho3D::HashMap< unsigned long long, unsigned >, 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< unsigned, Urho3D::Node * >, Urho3D::HashMap< unsigned, Urho3D::Component * >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::PODVector< Urho3D::Node * > >, Urho3D::HashMap< Urho3D::StringHash, Urho3D::String >, Urho3D::HashMap< unsigned, Urho3D::NodeReplicationState >, Urho3D::HashMap< unsigned, Urho3D::WeakPtr< Urho3D::Node > >, Urho3D::HashMap< unsigned, Urho3D::WeakPtr< Urho3D::Component > >, Urho3D::HashMap< const char *, asITypeInfo * >, Urho3D::HashMap< int, Urho3D::PODVector< const char * > >, Urho3D::HashMap< asITypeInfo *, bool >, Urho3D::HashMap< Urho3D::String, asIScriptFunction * >, Urho3D::HashMap< asITypeInfo *, Urho3D::HashMap< Urho3D::String, asIScriptFunction * > >, Urho3D::HashMap< asIScriptObject *, Urho3D::SharedPtr< Urho3D::ScriptEventInvoker > >, Urho3D::HashMap< Urho3D::AttributeInfo *, unsigned >, Urho3D::HashMap< Urho3D::String, Urho3D::Variant >, 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, unsigned >, 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< unsigned long long, Urho3D::LightBatchQueue >, Urho3D::HashMap< unsigned, 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< Urho3D::Pair< Urho3D::ShaderVariation *, Urho3D::ShaderVariation * > >, Urho3D::HashSet< Urho3D::Drawable * >, Urho3D::HashMap< T, U >, and Urho3D::HashSet< T >.
Public Member Functions | |
HashBase () | |
Construct. | |
void | Swap (HashBase &rhs) |
Swap with another hash set or map. | |
unsigned | Size () const |
Return number of elements. | |
unsigned | NumBuckets () const |
Return number of buckets. | |
bool | Empty () const |
Return whether has no elements. | |
Static Public Attributes | |
static const unsigned | MIN_BUCKETS = 8 |
Initial amount of buckets. | |
static const unsigned | MAX_LOAD_FACTOR = 4 |
Maximum load factor. | |
Protected Member Functions | |
void | AllocateBuckets (unsigned size, unsigned numBuckets) |
Allocate bucket head pointers + room for size and bucket count variables. | |
void | ResetPtrs () |
Reset bucket head pointers. | |
void | SetSize (unsigned size) |
Set new size. | |
HashNodeBase ** | Ptrs () const |
Return bucket head pointers. | |
Protected Attributes | |
HashNodeBase * | head_ |
List head node pointer. | |
HashNodeBase * | tail_ |
List tail node pointer. | |
HashNodeBase ** | ptrs_ |
Bucket head pointers. | |
AllocatorBlock * | allocator_ |
Node allocator. | |
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.