Skip to content

Small collection of Design Patterns Examples in C++(tasks done by me)

Notifications You must be signed in to change notification settings

ico12319/Design-Patterns-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Here, you'll find simple and clear implementations of various design patterns in C++. Whether you're new to design patterns or just looking for some practical examples, this repo aims to help you understand and apply these concepts in your own projects. Included Design Patterns(for now):

  1. Visitor pattern: The Visitor pattern lets you add further operations to objects without having to modify them. It's great for when you need to perform different actions on a group of related objects.
  2. Composite pattern(Tree structure): The Composite pattern allows you to build tree structures of objects. This helps you work with these objects uniformly, whether you're dealing with a single object or a whole tree.
  3. Singleton: The Singleton pattern ensures that a class has only one instance and provides a global access point to it. Use this when you need a single point of control for a particular resource.
  4. Factory: The Factory Design Pattern is a creational pattern that provides a way to encapsulate the instantiation of objects. It defines an interface for creating an object, but lets subclasses alter the type of objects that will be created. This pattern is particularly useful when the exact type of object to be created isn’t known until runtime.
  5. Prototype pattern: The prototype design pattern lets us copy existing objects without making our code dependent on their classes.(most of the examplese in this repo)

About

Small collection of Design Patterns Examples in C++(tasks done by me)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published