Skip to content

vbflash/singletone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description for Singletone Template

abstract

I want to using singletone template on my project. but, some singletone template don't work on my project and it is don't reasonable another platform.

Description for C/C++ on embedded

  1. singletone using for your project
  • import singletone.hpp
  1. on my class using inheritance of singletone template
  • same as inhertance but don't using it.
  • just using below.

Importance

need to below in class header file.

typedef Singleton<Logger> LoggerSingleton; 

Implement of singletone in main code

call to function1
LoggerSingleton::GetSingleton().init(1, "hong");
call to function2
int n1 = LoggerSingleton::GetSingleton().getNumber();
char *name1 = LoggerSingleton::GetSingleton().getName();

About

singletone code for develop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published