User Tools


Singleton

The singleton design pattern is a classic design pattern in Object Oriented Programming. It's used inside Annwvyn for some object for two things :

  • Assuring that a particular class is instantiated only once (at the same time)
  • Giving static access to an object by publicly getting access to it's instance

Example of singleton classes in Annwvyn include AnnEngine.

You can read a bit about singleton here : https://en.wikipedia.org/wiki/Singleton_pattern