当一个类从1000个类中多次继承时,是否会出现问题 [英] Can there be problems when a class is multiply inherited from 1000s of classes

查看:49
本文介绍了当一个类从1000个类中多次继承时,是否会出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我们为一个系统做了一个面向对象的设计,它将创建一个由大约1000个中小型继承的
类乘法

课程。


如果你能帮我解决以下问题,我会很高兴:

这会给GNU带来任何问题g ++编译,链接等?

对系统性能有什么影响?

还有什么需要考虑的吗?


谢谢

Janaka

解决方案

Janaka Perera写道:


大家好,


我们为一个系统做了一个面向对象的设计,它将创建一个

类乘以1000个中小型

班。


如果你能帮助我,我会很高兴:

这可以吗用GNU g ++编译,链接等创建任何问题?

W帽子会对系统的性能产生影响吗?

还有什么需要考虑的吗?


谢谢

Janaka



''类是从1000个类中继承的''


''类乘法继承了大约1000个中小型大小班级''


你的意思是?它有很大的不同。


john


对不起..它应该是1000个左右,而不是1000个


On 28 Maj,11:06,Janaka Perera< janaka ... @ gmail.comwrote:

< blockquote class =post_quotes>


>> Janaka Perera写道:


>>我们为一个系统做了一个面向对象的设计,该系统将创建一个继承大约1000个小的多重类中等班级。


>>我会如果你可以帮我解决以下问题,那就太棒了:
这可以在GNU g ++编译,链接等方面造成任何问题吗?
对系统性能会有什么影响?
还有别的我们要考虑?


>>''类是从1000个类中多次继承的''


>>''类乘以大约1000个中小型继承classes''


>>你的意思是?它有很大的不同。


对不起..它应该是1000左右,而不是1000s



首先,请引用您要回复的文本(上面已修复)。


John问的是你所谈论的对象是否会继承
$ b 1000个类中的$ b或者1000个不同的类将继承自

对象。


在后一种情况下应该没有问题。在第一种情况下,

可能是编译器的一些问题(虽然我对此表示怀疑)并且

可能会对性能产生影响。然而,这可能是你问题的最小问题,因为试图维持这样一个怪物将是噩梦。


- -

Erik Wikstr?m


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

解决方案

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


这篇关于当一个类从1000个类中多次继承时,是否会出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆