https://github.com/abdullahselek/queuecxx
C++ generic Queue implementation.
https://github.com/abdullahselek/queuecxx
cpp generic library queue
Last synced: 11 months ago
JSON representation
C++ generic Queue implementation.
- Host: GitHub
- URL: https://github.com/abdullahselek/queuecxx
- Owner: abdullahselek
- License: mit
- Created: 2017-05-29T11:36:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-10T08:14:46.000Z (about 9 years ago)
- Last Synced: 2025-07-23T08:04:08.311Z (12 months ago)
- Topics: cpp, generic, library, queue
- Language: CMake
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# queuecxx
[](https://travis-ci.org/abdullahselek/queuecxx)
Generic Queue implementation with C++ as a library.
## Building Repository
To build the repository you need CMake. You can download from [here](https://cmake.org/download/).
You can create a shortcut ```cmake``` command for macOS as below
```
sudo mkdir -p /usr/local/bin
sudo /Applications/CMake.app/Contents/bin/cmake-gui --install=/usr/local/bin
```
After cloning repository to your own local machine go to project root folder and run
```
cmake .
```
and then
```
cmake --build .
```
to run unit tests for UNIX machines
```
cd test
./tests --gtest_color=yes
```
and for Windows machines
```
cd test/Debug/
tests.exe --gtest_color=yes
```
## Sample Usage
Initiate queue object with int type as below
```
Queue queue{3};
```
Insert item
```
queue.insert(1);
```
Checking if queue is empty
```
bool isEmpty = queue.isEmpty();
```
Checking if queue is full
```
bool isFull = queue.isFull();
```
Getting queue size
```
int size = queue.size();
```
Remove item from queue
```
int removedItem = queue.removeData(1);
```