summaryrefslogtreecommitdiff
path: root/src/utils.hh
AgeCommit message (Collapse)Author
2014-11-17Import std::begin/std::end so that container utils work correctly with non ↵Maxime Coste
std containers
2014-11-02Remove AutoRegister util templateMaxime Coste
2014-10-22Refactor highlighters, use an interface with virtual methodsMaxime Coste
2014-09-26Remove unused functionMaxime Coste
2014-08-12Make safe_ptr able to track callstacksMaxime Coste
The code stays disabled, as the performance penalty is quite high, but can be enabled to help debugging safe pointers.
2014-06-15Refactor highlighter command completionsMaxime Coste
2014-03-20Container utility functions now use the free begin/end functionsMaxime Coste
2014-01-27remove unused Singleton::delete_instanceMaxime Coste
2013-12-20Get rid of Editor for goodMaxime Coste
ClientManager now stores only the free windows, clients take ownership of its own.
2013-12-14Move template selectors to the headerMaxime Coste
2013-11-14indent cleanup, correct erroneous 3 spaces indentMaxime Coste
2013-10-24Add std::hash specialization for std::pairMaxime Coste
2013-08-01contains: do not check if container is emptyMaxime Coste
2013-06-06replace remaining plain assert with kak_assertMaxime Coste
2013-05-06add specialized contains function for unordered_setMaxime Coste
2013-04-23utils: add is_in_range functionMaxime Coste
2013-04-12remove String::replace, use boost::regex_replace directlyMaxime Coste
2013-04-09sort includes directivesMaxime Coste
2013-04-09rename assert to kak_assert to avoid collisionsMaxime Coste
2013-04-02OnScopeEnd: move parameter instead of copying itMaxime Coste
2013-04-02Extract AutoRegister logic to a helper classMaxime Coste
2013-03-22BufferManager notify the ClientManager when a buffer diesMaxime Coste
2013-02-28safe_ptr have no overhead when KAK_DEBUG is not definedMaxime Coste
2013-02-27Containers utils: use Container&& in order to accept temporariesMaxime Coste
2013-01-31Remove Set and use unordered_setMaxime Coste
2013-01-29fix contains for empty containersMaxime Coste
2013-01-11Add and use a Set template class for recuring small setsMaxime Coste
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.