Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Versioning support (hack-ishly solved)
Re: Versioning support (hack-ishly solved) [message #52223 is a reply to message #52155] Mon, 12 August 2019 08:00 Go to previous message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
Added history-keeping to the header/macro...

The new header is:
#ifndef _VersionRBT_h_
#define _VersionRBT_h_

#define V_RELEASE 0
#define V_BUILD 0
#define V_TEST 0
#define N_2_S0(x) #x
#define N_2_S(x) N_2_S0(x)
#define V_VERSION "v " N_2_S(V_RELEASE) "." N_2_S(V_BUILD) "." N_2_S(V_TEST)


//=============================================================================
//history will be updated by the Versioning-macro..
// and can be accessed with something like:
//	{
//		std:: string s{"History\n"};
//		for (auto p:VersionHistory<>) { s+="    ["; s+=p.first; s+="] -> "; s+=p.second; s+="\n"; }
//		PromptOK(DeQtf(s.c_str()));
//	}

#include <map>

template<typename S=std::string> struct MVHIST
{
    std::map<S, S> m;
    MVHIST(const S &k, const S &v) { m[k]=v; }
    MVHIST<S>& operator()(const S &k, const S &v) { m[k]=v; return *this; }
    operator std::map<S, S>() { return m; }
};

template<typename S=std::string> std::map<S, S> VersionHistory=MVHIST<S>
//HISTORY (insertion-point, leave this comment in place - see macro)
;


#endif


and the macro is attached.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding Zig Language Support [FEATURE REQUEST]
Next Topic: Disable Assits++ scan on certain files
Goto Forum:
  


Current Time: Thu Mar 28 23:57:43 CET 2024

Total time taken to generate the page: 0.00940 seconds