473,382 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Bug (feature) in the CodeGenerator namespace

I have written a code generating application based on the CodeGenerator
classes for a project we're working on. We need to generate a large number
of structs for interoperability purposes, so I figured we may as well
automate the process.

In the course of developing this generator I came across one small problem.
I specify the IsStruct property as true, but when my properties are
generated, they always exhibit the virtual modifier (I specify that the
properties should be public).

This default would make sense with a class if you were planning on
inheriting off a base class, but you can't use inheritance with structs.
So, I have to eliminate all the virtuals before compiling. It seems to me
that it should be possible to alter the CodeGenerator classes to prevent
this modifier from appearing if the user has specified IsStruct as true.

On a similar note; is there some way I can manually prevent the virtual from
appearing? I couldn't find any obvious mechanism.

Rob
Nov 15 '05 #1
0 745

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Michele Simionato | last post by:
I have read with interest the recent thread about closures. The funny thing is that the authors are arguing one against the other but I actually agree with all of them and I have a proposal that...
5
by: Steven T. Hatton | last post by:
I often encounter statements in documentation or comments in source code that says things along the lines of "not all compilers support X, so we did not use it." X might be namespaces,...
14
by: Matt | last post by:
Do we have sscanf feature in C++? I guess since C++ is superset of C. So the following are valid C++ code. Is that true? char* buf = "10:25:33"; sscanf(buf, "%d:%d:%d", &h, &m, &s); Please...
5
by: Fernando Hunth | last post by:
Why was not included , like in VB.Net the With feature. In VB you can use an Object like this. With MyObject .Text = "Hi" End With Or like jScript with (MyObject)
7
by: Peter Oliphant | last post by:
I just found out the following code compiles: ref class ClassA { public: ClassA() { x = 0 ; X_To_1( ) ; void X_To_2( ) ; // ****
32
by: toolmaster | last post by:
Since many of the modern computer languages have built-in namespace features, I can't understand why not add this feature into standard C. I've heard many people complain of the lacking of...
5
by: herbert | last post by:
back in 1978 (!) the VAX/VMS serial line driver offered everything a developer needs to develop protocols of all kinds: - read x bytes - read to end of line - read to special character - read...
26
by: samjnaa | last post by:
Hello. Please tell me whether this feature request is sane (and not done before) for python so it can be posted to the python-dev mailing list. I should say first that I am not a professional...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.