This project implements a Thread Pool combined with the Command and Observer design patterns using C++. It integrates with the Cocos2d-x game development framework and includes unit tests with Google Test (gtest).
- Thread Pool: Manages a pool of worker threads to execute tasks concurrently.
- Command Pattern: Encapsulates requests as objects, allowing for parameterization and queuing of requests.
- Observer Pattern: Defines a subscription mechanism to notify multiple objects about events.
- Cocos2d-x Integration: Demonstrates usage within the Cocos2d-x game engine environment.
- Unit Testing: Includes tests using the Google Test framework to ensure code reliability.
- C++11 or higher
- Cocos2d-x
- Google Test
-
Clone the Repository:
git clone https://github.com/youssefmyh/ThreadPoolcommandObserver.git
-
Navigate to the Project Directory:
cd ThreadPoolcommandObserver
-
Build the Project:
- Ensure Cocos2d-x and Google Test are properly set up in your development environment.
- Use your preferred build system to compile the project.
-
Run Unit Tests:
- Execute the test suite to verify functionality.
Classes/
: Contains the implementation of the Thread Pool, Command, and Observer patterns.gtest/
: Includes unit tests for the implemented patterns.pattern.jpg
andpattern.pdf
: Visual representations of the design patterns used.
Contributions are welcome! Feel free to open issues or submit pull requests to enhance the project.
This project is licensed under the MIT License.
- Cocos2d-x for the game development framework.
- Google Test for the testing framework.
For more information, visit the GitHub repository.