Skip to content

Latest commit

 

History

394 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hmfocx

A library of some basic container

Build Methods

Building in Linux

Git clone

git clone https://github.com/Flmpx/hmfocx.git

Build with cmake(enter the build folder firstly)

cmake ..

Generate the static library(this operation is also done in the build folder)

make

Everything has been done

you can find a file named libhmfocx.a in the bin folder, this is a static library about this project

Building in Windows (MinGW)

The steps are the same as above, just the command is different

git clone https://github.com/Flmpx/hmfocx.git

cmake .. -G "MinGW Makefiles"

mingw32-make

Use CMake Completely

I strongly suggest you to use cmake to clone, build and use this library(In that case, you can see comments of a function when you use this function)

Add some code in CMakeLists.txt of your project

# ...
include(FetchContent)

FetchContent_Declare(
    hmfocx
    GIT_REPOSITORY https://github.com/Flmpx/hmfocx.git  # or git@github.com:Flmpx/hmfocx.git
    GIT_TAG v0.14.0
)

FetchContent_MakeAvailable(hmfocx)

# ...

target_link_library(your_executable PRIVATE hmfocx)

Run common the build process of cmake

mkdir build 
cd build
cmake ..
make

Detail Information About Containers

The document include next part

  • Introduction of containers
  • The detained comment about functions of every containers
  • Try part to will teach you how to calling this function
  • Some Tip, Note or Warning in it

Document Link

Struct Name Fact
hm_list List
hm_map Hash Table(Map)
hm_pool Memory Pool
hm_stack Stack
hm_queue Queue
hm_heap Heap
hm_set Hash Set
hm_arr Array
hm_str String

Design

The Container include the main container and it's iterator

The Name Of Containers Or Some Variable

  • main format -- hm_{container}_{Other_1}_{Other_2}_ ...
  • All containers' name start with hm_, like List's name -- hm_list, and this is a flag of this library
  • And there have some enum or struct in every container, like Map's entry name -- hm_map_entry, some enum's name see comment of every function

The Functions' Name Of Every Container

  • main format -- hm_{container}_{action}_{more info}_ ...
  • Like conatiner's name, it must start with hm_
  • The action include init, insert, del, shrink, clear, free and more...

About

蛮的一库

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages