Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
AutoVersioning Plugin
JGM:
Sorry i have been out of c++ programming these days since im running my own business and lot of work. I want to make some changes to the plugin, also some one emailed me that the DATE variable is declared on some linux headers with the same name and is having conflicts. I have all in my todo list.
I will try to work on it this week or the next one. I will try to add the defines as a option also. Also i want to work on codepacks plugin, I need to write some documentation for codepacks and reorganize some sources since i should work in conjunction with other good developer that contacted me to join forces :D
Sorry for being so lazy :cry:
killerbot:
--- Quote from: MaxLondon on August 11, 2008, 03:48:03 pm ---I'm aware of the improved type checking, however there are a number of things I can't do with const values, like conditional compiling and other compile time stuff like string concatenation, etc. Also anything which goes into an .rc file.
For me it would be really helpful to have these defines.
Maybe it's possible to NOT create them by default, unless some config option is enabled,
Any chance?
--- End quote ---
notte that some things of conditional compiling can be done with regular code (implementation of interfaces). Unless you are at the driver level, it is good practice to avoid #ifdef. And it is possible to do that ;-)
MaxLondon:
--- Quote from: killerbot on August 12, 2008, 07:47:28 am ---notte that some things of conditional compiling can be done with regular code (implementation of interfaces). Unless you are at the driver level, it is good practice to avoid #ifdef. And it is possible to do that ;-)
--- End quote ---
I have to maintain several slightly different versions of an application. For me conditional compiling is a decent way to handle this, with reasonable amount of additional effort.
Also, how would you handle Logging functions or anything you need in your debug build but don't want in your release build without using #ifdef's or PP macros? Also as mentioned before, how would you do this with .rc files?
I'm not aware of a elegant way to implement this in C++ without using the PP directives. If there's a better way please let me know. ;-)
Biplab:
IMO there should be an option to generate code in C/C++ style.
PP directives, if used carefully can produce better code. But if anyone uses it to write functions which require type checking, it's the fault of that programmer; not of pre-processor. A good programmer shall be aware of such limitations and use the available features accordingly.
Would any one stop using pointers just because it may produce fatal crash in some cases (deleting null pointer)?? A good programmer should go for a check of null pointer wherever required; not avoiding the pointers all together.
C/C++ both can't provide automated garbage collection. I don't think people are going to stop using it in future because of this. Rather people will code accordingly keeping this limitation in mind.
I disagree with the philosophy that anything related to C should be avoided.
killerbot:
say you create a log interface 'ILoggingInterface'. For simplicity say only 1method Log(std::string Something)
==> void ILoggingInterface::Log(std::string Something)
==>make abstract class ILoggingInterface;
Implement in 1 set of files which actually do something., say a.cpp, and a dummy empty version :b.cpp.
In your Debug target you say to use a.cpp, and in the Release you say to use b.cpp.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version