Hi All,
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
Thanks
Janaka 12 1991
Janaka Perera wrote:
Hi All,
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
Thanks
Janaka
'class is multiply inherited from 1000s of classes'
'class multiply inherited by around 1000 small and medium sized classes'
Which one do you mean? It makes quite a big difference.
john
Sorry.. it should be around 1000 classes, not 1000s
On 28 Maj, 11:06, Janaka Perera <janaka...@gmail.comwrote:
>>Janaka Perera wrote:
>>We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes.
>>I would be greatful if you can help me with the following: Can this create any problems with GNU g++ compilation, linking etc? What would be the impact to the performance of the system? Anything else we have to consider?
>>'class is multiply inherited from 1000s of classes'
>>'class multiply inherited by around 1000 small and medium sized classes'
>>Which one do you mean? It makes quite a big difference.
Sorry.. it should be around 1000 classes, not 1000s
First of all, please quote the text you are replying to (fixed above).
What John asked was if the object you are talking about will inherit
from 1000 classes or if 1000 different classes will inherit from the
object.
In the later case there should be no problems. In the first case there
might be some problems with the compiler (though I doubt it) and there
might be an impact on performance. However that would probably be the
least of your problem since trying to maintain such a monster would be
a nightmare.
--
Erik Wikström
On 28 May, 10:06, Janaka Perera <janaka...@gmail.comwrote:
Sorry.. it should be around 1000 classes, not 1000s
*What* should be 1000 not 1000s? You didn't quote any context and your
message makes no sense on its own. Please see http://cfaj.freeshell.org/google/
Thanks. Context added back in - but look how much manual cutting and
pasting I've had to do to put the context back in. Don't expect me
(or, I imagine, most other people) to do that for you very often.
[Janaka Perera]
[Subject: Can there be problems when a class is multiply inherited
from 1000s of classes]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
[John Harrison]
'class is multiply inherited from 1000s of classes'
'class multiply inherited by around 1000 small and medium sized
classes'
Which one do you mean? It makes quite a big difference.
[Janaka Perera]
Sorry.. it should be around 1000 classes, not 1000s
[Me]
I don't think John Harrison is worried about the difference between
the number of classes being 1000 or 1000s. The distinction between one
thousand and many thousands is unlikely to be significant. One
thousand may well be quite enough to introduce problems if there are
going to be any. The important distinction is (my emphasis):
'class is multiply inherited *FROM* 1000s of classes'
'class multiply inherited *BY* around 1000 small and medium sized
classes'
Which is it?
Gavin Deane
On May 28, 9:47 am, Janaka Perera <janaka...@gmail.comwrote:
Hi All,
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
Thanks
Janaka
Although there are some cases, when its intended, both might be a sign
of novice design/design misuse.
None of those should pose any significant compilation problems under
gnu. But, the class inheriting from 1k others will compile slowly,
very slowly imho.
regards,
pawel
On May 28, 2:40 pm, Gavin Deane <deane_ga...@hotmail.comwrote:
On 28 May, 10:06, Janaka Perera <janaka...@gmail.comwrote:
Sorry.. it should be around 1000 classes, not 1000s
*What* should be 1000 not 1000s? You didn't quote any context and your
message makes no sense on its own. Please see
http://cfaj.freeshell.org/google/
Thanks. Context added back in - but look how much manual cutting and
pasting I've had to do to put the context back in. Don't expect me
(or, I imagine, most other people) to do that for you very often.
[Janaka Perera]
[Subject: Can there be problems when a class is multiply inherited
from 1000s of classes]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
[John Harrison]
'class is multiply inherited from 1000s of classes'
'class multiply inherited by around 1000 small and medium sized
classes'
Which one do you mean? It makes quite a big difference.
[Janaka Perera]
Sorry.. it should be around 1000 classes, not 1000s
[Me]
I don't think John Harrison is worried about the difference between
the number of classes being 1000 or 1000s. The distinction between one
thousand and many thousands is unlikely to be significant. One
thousand may well be quite enough to introduce problems if there are
going to be any. The important distinction is (my emphasis):
'class is multiply inherited *FROM* 1000s of classes'
'class multiply inherited *BY* around 1000 small and medium sized
classes'
Which is it?
Gavin Deane
It's FROM 1000s of classes..
Sorry for the inconvenience caused. I am new to this posting thing.
Actually this is my first post. Thanks a lot for the instructions.
I'll refer http://cfaj.freeshell.org/google/
On May 28, 2:31 pm, Erik Wikström <eri...@student.chalmers.se wrote:
On 28 Maj, 11:06, Janaka Perera <janaka...@gmail.com wrote:
[Janaka Perera]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.<snip>
[Erik Wikström]
What John asked was if the object you are talking about will inherit
from 1000 classes or if 1000 different classes will inherit from the
object.
In the later case there should be no problems. In the first case there
might be some problems with the compiler (though I doubt it) and there
might be an impact on performance. However that would probably be the
least of your problem since trying to maintain such a monster would be
a nightmare.
[Me]
It's the first case. If there is a performance impact, it definitely
going to be a problem for us. But maintaining the code will not be a
much problem since we are developing a code generator which will
generate code using a meta-base.
Thanks
Janaka
Janaka Perera wrote:
On May 28, 2:40 pm, Gavin Deane <deane_ga...@hotmail.comwrote:
>On 28 May, 10:06, Janaka Perera <janaka...@gmail.comwrote:
>>Sorry.. it should be around 1000 classes, not 1000s
*What* should be 1000 not 1000s? You didn't quote any context and your message makes no sense on its own. Please see
http://cfaj.freeshell.org/google/
Thanks. Context added back in - but look how much manual cutting and pasting I've had to do to put the context back in. Don't expect me (or, I imagine, most other people) to do that for you very often.
[Janaka Perera] [Subject: Can there be problems when a class is multiply inherited from 1000s of classes] We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes.
I would be greatful if you can help me with the following: Can this create any problems with GNU g++ compilation, linking etc? What would be the impact to the performance of the system? Anything else we have to consider?
[John Harrison] 'class is multiply inherited from 1000s of classes'
'class multiply inherited by around 1000 small and medium sized classes'
Which one do you mean? It makes quite a big difference.
[Janaka Perera] Sorry.. it should be around 1000 classes, not 1000s
[Me] I don't think John Harrison is worried about the difference between the number of classes being 1000 or 1000s. The distinction between one thousand and many thousands is unlikely to be significant. One thousand may well be quite enough to introduce problems if there are going to be any. The important distinction is (my emphasis):
'class is multiply inherited *FROM* 1000s of classes'
'class multiply inherited *BY* around 1000 small and medium sized classes'
Which is it?
Gavin Deane
It's FROM 1000s of classes..
Sorry for the inconvenience caused. I am new to this posting thing.
Actually this is my first post. Thanks a lot for the instructions.
I'll refer http://cfaj.freeshell.org/google/
Right, that is a strange design. I have no experience with similar
designs, nor I suspect do many people. I think you are just going to
have to try it and find out.
Is this some kind of template meta-programming exercise?
If find it hard to believe that you've written
class Strange : public <huge list of 1000 classes here>
{
};
but with TMP you could achieve something similar. My guess would be that
you can expect problems, as you should examine carefully the benefits of
such a design. But as I said I have no experience.
john
On 28 Maj, 13:05, Janaka Perera <janaka...@gmail.comwrote:
On May 28, 2:31 pm, Erik Wikström <eri...@student.chalmers.se wrote:
On 28 Maj, 11:06, Janaka Perera <janaka...@gmail.com wrote:
[Janaka Perera]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.<snip>
[Erik Wikström]
What John asked was if the object you are talking about will inherit
from 1000 classes or if 1000 different classes will inherit from the
object.
In the later case there should be no problems. In the first case there
might be some problems with the compiler (though I doubt it) and there
might be an impact on performance. However that would probably be the
least of your problem since trying to maintain such a monster would be
a nightmare.
[Me]
It's the first case. If there is a performance impact, it definitely
going to be a problem for us. But maintaining the code will not be a
much problem since we are developing a code generator which will
generate code using a meta-base.
If one might ask, how did you come up with that design. I can't think
of any good reason to inherit from so many classes. You can't possibly
have that many interfaces so you are most probably inheriting to get
functionality, but if you use generation why not just put it straight
in the class?
--
Erik Wikström
On May 28, 4:57 pm, Erik Wikström <er****@student.chalmers.sewrote:
On 28 Maj, 13:05, Janaka Perera <janaka...@gmail.comwrote:
On May 28, 2:31 pm, Erik Wikström <eri...@student.chalmers.se wrote:
On 28 Maj, 11:06, Janaka Perera <janaka...@gmail.com wrote:
[Janaka Perera]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.<snip>
[Erik Wikström]
What John asked was if the object you are talking about will inherit
from 1000 classes or if 1000 different classes will inherit from the
object.
In the later case there should be no problems. In the first case there
might be some problems with the compiler (though I doubt it) and there
might be an impact on performance. However that would probably be the
least of your problem since trying to maintain such a monster would be
a nightmare.
[Me]
It's the first case. If there is a performance impact, it definitely
going to be a problem for us. But maintaining the code will not be a
much problem since we are developing a code generator which will
generate code using a meta-base.
If one might ask, how did you come up with that design. I can't think
of any good reason to inherit from so many classes. You can't possibly
have that many interfaces so you are most probably inheriting to get
functionality, but if you use generation why not just put it straight
in the class?
--
Erik Wikström
To make it better understandable, we are talking about a shared
library in Solaris platform generated by a code generator using Meta -
information.
The reasons behind the design are
1. We can't generate the whole code set in to a single file because
GNU g++ cannot compile it even using a server with 16GB RAM in it for
the reason that code is too large.
2. We have a set of common functions in the API which every program
uses this library wants. There are also another set of functionalities
requires by other modules (executables/libraries) depending its
requirement (lets say classes that represents entities). Some classes
are shared by multiple modules. By using this design we can inherit
the classes that we want and create similar interfaces(header files)
for each module which uses the API and still use the same shared
library since the symbols are same( We need all the interfaces
inherited only for a one module which uses this module)
3. If we include the whole header information in to a single file
without separating and including only necessary ones, compilation of
the modules which uses this API take hours to compile.(true, it will
take a lot of time for this module to compile but it's a one time
compilation)
On May 28, 11:47 am, Janaka Perera <janaka...@gmail.comwrote:
Hi All,
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.
I would be greatful if you can help me with the following:
Can this create any problems with GNU g++ compilation, linking etc?
What would be the impact to the performance of the system?
Anything else we have to consider?
Thanks
Janaka
Depends on "how does it multiply inherited"(there is virtual
inheritance, for example) and "what is classes it multiply inherited
form"(have they base classes too? have they vtable(any virtual
functions, declared in those or those bases)?) and some other things...
On May 28, 2:02 pm, Janaka Perera <janaka...@gmail.comwrote:
On May 28, 4:57 pm, Erik Wikström <eri...@student.chalmers.sewrote:
On 28 Maj, 13:05, Janaka Perera <janaka...@gmail.comwrote:
On May 28, 2:31 pm, Erik Wikström <eri...@student.chalmers.se wrote:
On 28 Maj, 11:06, Janaka Perera <janaka...@gmail.com wrote:
[Janaka Perera]
We have done a object oriented design for a system which will create a
class multiply inherited by around 1000 small and medium sized
classes.<snip>
[Erik Wikström]
What John asked was if the object you are talking about will inherit
from 1000 classes or if 1000 different classes will inherit from the
object.
In the later case there should be no problems. In the first case there
might be some problems with the compiler (though I doubt it) and there
might be an impact on performance. However that would probably be the
least of your problem since trying to maintain such a monster would be
a nightmare.
[Me]
It's the first case. If there is a performance impact, it definitely
going to be a problem for us. But maintaining the code will not be a
much problem since we are developing a code generator which will
generate code using a meta-base.
If one might ask, how did you come up with that design. I can't think
of any good reason to inherit from so many classes. You can't possibly
have that many interfaces so you are most probably inheriting to get
functionality, but if you use generation why not just put it straight
in the class?
--
Erik Wikström
To make it better understandable, we are talking about a shared
library in Solaris platform generated by a code generator using Meta -
information.
The reasons behind the design are
1. We can't generate the whole code set in to a single file because
GNU g++ cannot compile it even using a server with 16GB RAM in it for
the reason that code is too large.
2. We have a set of common functions in the API which every program
uses this library wants. There are also another set of functionalities
requires by other modules (executables/libraries) depending its
requirement (lets say classes that represents entities). Some classes
are shared by multiple modules. By using this design we can inherit
the classes that we want and create similar interfaces(header files)
for each module which uses the API and still use the same shared
library since the symbols are same( We need all the interfaces
inherited only for a one module which uses this module)
3. If we include the whole header information in to a single file
without separating and including only necessary ones, compilation of
the modules which uses this API take hours to compile.(true, it will
take a lot of time for this module to compile but it's a one time
compilation)
I did a POC, created a class multiply inherited from 1500 classes.
Everything is successfully working without a problem.
Wanted let you all know. Thanks for all who replied. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fernando Rodriguez |
last post by:
Hi,
I need to traverse the methods defined in a class and its superclasses. This
is the code I'm using:
# An instance of class B should be able to check all the methods defined in B
#and A,...
|
by: Rajorshi |
last post by:
Hi,
I have two classes, say, Base1 and Base2. Now Derv is a class derived
from both like
class Derv(Base1,Base2).....
In the destructor of the derived class, if I write something like this
def...
|
by: ziga.seilnacht |
last post by:
"""
I am trying to write some classes representing the quaternion number.
I wrote a base class, which implements only the numerical interface,
and a few subclasses, which provide methods for their...
|
by: M Shafaat |
last post by:
Hi!
I want to make a base class with some base properties and then derive
different other classes from that in which I want to override the base
properties to get specialized behaviour unique for...
|
by: Charles |
last post by:
I am still having problems with sessions crossing over from other sessions. What I mean by this is that Mary may get just some or all of Renae’s information. I think that what is going on with...
|
by: Spam Trap |
last post by:
I am getting strange resizing problems when using an inherited form.
Controls are moving themselves seemingly randomly, but reproducibly.
"frmBase" is my base class (a windows form), and...
|
by: Greg Allen |
last post by:
I am consuming a web service and using the generated Reference.cs to access
the service and the objects associated with it.
I have run into a problem where some inherited classes are not being...
|
by: wes |
last post by:
Hi,
Is there anyway to disambiguate multiply inherited static class
functions?
template<T>
class A
{
static doit() {}
}
|
by: Ed |
last post by:
Hi, dear all,
Now there is a issue to convert C++ into CLI/C++. But there is a issue
block me.
Say Class MN is multiple derived from class MM and NN. But the CLI
only allow single class...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |