Skip to content

LoreDN/Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💻 LoreDN/C++

This repository is a collection of libraries and classes definitions for programming in C++.

❓ How to use the repo

The repo consist of different folders:

  • docs/ : documentation for every library, written both as .pdf and UML.
  • include/LDN/ : contains the header files .hpp and .tpp ( it mirrors the installation path ).
  • src/ : Explicit Template Instantations (ETI) for template-based libraries ( such as Hash ).
  • test/ : collection of some tests for the various libraries.

❗ Exceptions Handling

In order to handle in the best way possible all the various exceptions that can occurre when using the libraries, has been designed a specific exception-library named LDN::Exception, which aims to be used as a support for all the other libraries, in order to make them work correctly.
The Exception library contains some custom exceptions, as well as some functions to use in order to eventually catch them.
The library has been implemented in this way in order to make it easy to be used in all the other projects, however it is also avaible for common use, as well as all the other libraries ( if it is included in the project obviously ).

📦 Packages Releases

In order to make as easy as possible to get and use the libraries, the only thing that the user needs to do is to install the wanted .deb package.
It can be done with the following bash commands:

# change LIB / VERSION / PACKAGE with the wanted ones (as Exception / v1.0.0 / ldn-exception-v1.0.0)

# download the wanted package
wget https://github.com/LoreDN/Cpp/releases/download/LIB_VERSION/PACKAGE.deb

# install the package
sudo dpkg -i PACKAGE.deb

# add the "LDN" subfolder path to the linker paths
echo "/usr/lib/LDN" | sudo tee /etc/ld.so.conf.d/ldn.conf
sudo ldconfig

Finally, in order to compile your program using the library, all you have left to do is to add this command to the compilation one:

# -I/usr/include/LDN adds the /usr/include/LDN/ folder to the include paths (you can also use #include <LDN/LIB>)
# -L/usr/lib/LDN adds the /usr/lib/LDN/ folder to the linking paths (in order to use the library -lLDN_LIB)

# -lLIB indicates the library binary file, you have to change LIB with the wanted one (as Hash for -lLDN_Hash)
g++ main.cpp -o program -I/usr/lib/LDN -L/usr/lib/LDN -lLDN_LIB


📖 Contents of the libraries

Here is a list of the libraries wich can be found in the repo, everyone in their subfolder:

1. Exception

The core of all the libraries collected in this repository, used in order to managed custom Exceptions.

# latest v1.1.0
wget https://github.com/LoreDN/Cpp/releases/download/Exception_v1.1.0/ldn-exception-v1.1.0.deb
sudo dpkg -i ldn-exception-v1.1.0.deb

# update linker path
echo "/usr/lib/LDN" | sudo tee /etc/ld.so.conf.d/ldn.conf
sudo ldconfig

2. Hash

Implementation of different Hash Data-Structures, for now have been implemented Hash-Sets with different hashing rules.

# latest v1.0.1
wget https://github.com/LoreDN/Cpp/releases/download/Hash_v1.0.1/ldn-hash-v1.0.1.deb
sudo dpkg -i ldn-hash-v1.0.1.deb

# update linker path
echo "/usr/lib/LDN" | sudo tee /etc/ld.so.conf.d/ldn.conf
sudo ldconfig

3. LinearAlgebra

Set of various mathematical tools used for performing Linear Algebra operations.

# latest v1.0.0
wget https://github.com/LoreDN/Cpp/releases/download/LinearAlgebra_v1.0.0/ldn-linear-algebra-v1.0.0.deb
sudo dpkg -i ldn-linear-algebra-v1.0.0.deb

# update linker path
echo "/usr/lib/LDN" | sudo tee /etc/ld.so.conf.d/ldn.conf
sudo ldconfig