summaryrefslogtreecommitdiff
path: root/src/utils.hh
AgeCommit message (Collapse)Author
2012-12-03ClientManager: support naming clients and accessing client's context by nameMaxime Coste
2012-11-12SafeCountable::m_count is mutable so that we can have safe_ptr<const T>Maxime Coste
2012-10-02do not use our broken safe bool, c++11 explicit bool conversion is betterMaxime Coste
2012-10-02move clamp to utils.hhMaxime Coste
2012-08-29escape whitespaces in filename or buffername completionsMaxime Coste
2012-06-30add safe_ptr::operator=(safe_ptr&&) and safe_ptr::reset(T*)Maxime Coste
2012-06-28Add SafeCountable and safe_ptr classesMaxime Coste
safe_ptr is a smart pointer which manage a safe count in pointed objects. SafeCountable provides the interface needed for safe_ptr and assert the safe count is zero in destructor. This permits to have pointers that guarantees their pointed object is alive.
2012-06-25remove ugly id_to_str param in idvaluemap and str_to_strMaxime Coste
2012-06-12Cleanup utils.hh, remove auto_raii in favor of on_scope_endMaxime Coste
2012-04-14replace std::string references with StringMaxime Coste
2012-01-25add a find(container, value) utility functionMaxime Coste
2011-12-20Utils: add on_scope_end utilityMaxime Coste
on_scope_end permits to register a functor to be called at scope end (either exception thrown or normal scope end). this is usefull for cleanup code that must be run. usage: auto cleaner = on_scope_end([]() { cleanup(); });
2011-12-02Window: use an idvaluemap to store highlightersMaxime Coste
2011-10-17utils: add contains functionMaxime Coste
2011-09-23Utils: Singleton template and migration of the BufferManagerMaxime Coste
Singletons are not autocreating, the application needs to create exactly one instance (I want to avoid implicit initialization order hell)
2011-09-17LineAndColumn: move to it's own header and add operator[+-]=?Maxime Coste
LineAndColumn is now a template so that WindowCoords and BufferCoords cannot be added together.
2011-09-14utils: add auto_raii helper functionMaxime Coste
this helper permits to register a resource and cleanup function to keep exception safety with C like resource. For exemple, to be sure that a FILE* will be closed, you can use: auto file = auto_raii(fopen("filename"), fclose); file will auto cast to FILE* when needed, and will call fclose when going out of scope.
2011-09-09assert: custom implementationMaxime Coste
2011-09-08utils: add operator== (const std::unique_ptr<T>&, T*)Maxime Coste
2011-09-06utils: Add reversed template helper for container iterationMaxime Coste
this permits to use range-based for loops to iterate on reversed containers. Should work on any container implementing rbegin and rend.
2011-09-05LineAndColumn: segregate into WindowCoord and BufferCoordMaxime Coste
Having the same type to specify coordinates in window space or buffer space is error prone, now the compiler will tell if we use one for another.