private inheritance vs containment

I know that this one has been discused many times and every single book
about C++ advices to first consider containment.

But I feel that there is a legitimate use of private inheritance when a
single condition is met (the base class has no virtual functions, so
inheriting from your class will not have a customization point you don't
intent to give) and the (small) extra performance private inheritance
gives is needed.

Any comments on my thinking.

Thanks in advance.

Sam.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Sam
5/27/2007 6:27:17 PM
comp.lang.c++.moderated 10708 articles. 0 followers. allnor (8507) is leader. Post Follow

11 Replies
387 Views

Similar Articles

[PageSpeed] 48
Sam wrote:
> I know that this one has been discused many times and every single book
> about C++ advices to first consider containment.
> 
> But I feel that there is a legitimate use of private inheritance when a
> single condition is met (the base class has no virtual functions, so
> inheriting from your class will not have a customization point you don't
> intent to give) and the (small) extra performance private inheritance
> gives is needed.

As a general advice, you may want to check out this C++ FAQ Lite topic:
[24] Inheritance - private and protected inheritance
http://www.parashift.com/c++-faq-lite/private-inheritance.html

and this message and thread from the past for a particular situation
where private inheritance is very useful:
http://groups.google.com/group/comp.lang.c++.moderated/browse_frm/thread/35c34091a34298f8/f4b765eb77950dfa#f4b765eb77950dfa

However, I cannot imagine a case where private inheritance will give
you any extra performance over containment. Can you give an example?

-- 
Seungbeom Kim

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Seungbeom
5/28/2007 6:29:03 AM
Sam <sakarab@yahoo.com> wrote:

> I know that this one has been discused many times and every single book
> about C++ advices to first consider containment.
> 
> But I feel that there is a legitimate use of private inheritance when a
> single condition is met (the base class has no virtual functions, so
> inheriting from your class will not have a customization point you don't
> intent to give) and the (small) extra performance private inheritance
> gives is needed.
> 
> Any comments on my thinking.

Just the opposite is true. Consider:

class Foo {
public:
    virtual void func();
};

class Bar : private Foo {
public:
    virtual void func(); // override here
};

To do the same with containment would require an extra class:

class FooChild : public Foo {
public:
    virtual void func(); // override here
};

class Bar {
    FooChild foo;
};

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Daniel
5/28/2007 6:31:14 AM
Seungbeom Kim wrote:
> Sam wrote:
>> ... and the (small) extra performance private inheritance
>> gives is needed.
> 
> However, I cannot imagine a case where private inheritance will give
> you any extra performance over containment. Can you give an example?
> 

When a contained object member function is called, its "this" pointer
must be calculated and passed to it. On the other hand in an inheritance
relationship the "this" pointer is the same with the derived object. No
calculation needed. Example:

struct A
{
     void do_work();
};

// containment
class B
{
private:
     A  mA;
public:
     void do_work()      { mA.do_work(); }
}

// private inheritance
class C : private A
{
public:
     void do_work()      { A::do_work(); }
}

int main()
{
     B    b;

     // gets address of b, calculates address of
     // B::mA and calls A::do_work()
     b.do_work();

     C    c;

     // gets address of c, directlly calls A::do_work()
     c.do_work();
}

Sam.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Sam
5/28/2007 12:17:39 PM
In article <f3erhm$fnq$1@mouse.otenet.gr>, Sam <sakarab@yahoo.com>
wrote:

> Seungbeom Kim wrote:
> > Sam wrote:
> >> ... and the (small) extra performance private inheritance
> >> gives is needed.
> > 
> > However, I cannot imagine a case where private inheritance will give
> > you any extra performance over containment. Can you give an example?
> > 
> 
> When a contained object member function is called, its "this" pointer
> must be calculated and passed to it. On the other hand in an inheritance
> relationship the "this" pointer is the same with the derived object. No
> calculation needed.

The above is a micro-optimization that the compiler can likely take care
of itself.

> Example:
> 
> struct A
> {
>      void do_work();
> };
> 
> // containment
> class B
> {
> private:
>      A  mA;
> public:
>      void do_work()      { mA.do_work(); }
> }
> 
> // private inheritance
> class C : private A
> {
> public:
>      void do_work()      { A::do_work(); }
> }
> 
> int main()
> {
>      B    b;
> 
>      // gets address of b, calculates address of
>      // B::mA and calls A::do_work()
>      b.do_work();
> 
>      C    c;
> 
>      // gets address of c, directlly calls A::do_work()
>      c.do_work();
> }

In the above code, the B::do_work function would likely be expanded
inline which means the "calculation" you speak of is done at compile
time, not run time. No performance advantage here.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Daniel
5/28/2007 5:27:15 PM
Daniel T. wrote:
> Sam <sakarab@yahoo.com> wrote:
> 
>> I know that this one has been discused many times and every single book
>> about C++ advices to first consider containment.
>>
>> But I feel that there is a legitimate use of private inheritance when a
>> single condition is met (the base class has no virtual functions, so
>> inheriting from your class will not have a customization point you don't
>> intent to give) and the (small) extra performance private inheritance
>> gives is needed.
>>
>> Any comments on my thinking.
> 
> Just the opposite is true.
> 

I don't really understand what your point is.
Can you elaborate please?

Sam.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Sam
5/28/2007 5:32:26 PM
In article <f3d8g6$o8l$1@news.Stanford.EDU>, Seungbeom Kim
<musiphil@bawi.org> wrote:

> 
> However, I cannot imagine a case where private inheritance will give
> you any extra performance over containment. Can you give an example?

struct Private
{
   void foo(){};
}

class A:private Private
{
public:
   using Private::foo;
};

class B
{
   Private b;
public:
   void foo() {b.foo();}
};

A  a;
B b;

b.foo() directly calls B::foo(), which calls Private::foo() but
a.foo() directly calls Private::foo().  Your compiler probably
will optimize the excess call away but private inheritance guarantees
the direct call of Private::foo().

Further private inheritance gives instant documentation that A uses
foo of Private with no changes. and using statements are ussually
shorter and less error prone than forwarding functions.  Take your
pick.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Carl
5/28/2007 7:48:09 PM
Sam <sakarab@yahoo.com> wrote:
> Daniel T. wrote:
> > Sam <sakarab@yahoo.com> wrote:
> > 
> > > I know that this one has been discused many times and every
> > > single book about C++ advices to first consider containment.
> > >
> > > But I feel that there is a legitimate use of private inheritance
> > > when a single condition is met (the base class has no virtual
> > > functions, so inheriting from your class will not have a
> > > customization point you don't intent to give) and the (small)
> > > extra performance private inheritance gives is needed.
> > >
> > > Any comments on my thinking.
> > 
> > Just the opposite is true.
> 
> I don't really understand what your point is. Can you elaborate
> please?

Maybe the FAQ will help:
http://www.parashift.com/c++-faq-lite/private-inheritance.html#faq-24.3

My point is that a legitimate use of private inheritance is when the
base class *does* have at least one virtual function, and you want to
override that function, but don't want the child class to be convertible
into the parent class.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Daniel
5/29/2007 12:40:37 AM
On May 27, 9:27 pm, Sam <saka...@yahoo.com> wrote:
> I know that this one has been discused many times and every single book
> about C++ advices to first consider containment.
>
> But I feel that there is a legitimate use of private inheritance when a
> single condition is met (the base class has no virtual functions, so
> inheriting from your class will not have a customization point you don't
> intent to give) and the (small) extra performance private inheritance
> gives is needed.

I use it in one of my template libraries.  The basic idea is that the
class implements an abstract interface, but that interface cannot be
accessible externally or to derived classes; the class limits access
to that interface via a mutex.  This ensures that the class itself can
cast to the abstract class under its own terms but nothing else can.
It's difficult to describe in a post, but here is the link.
http://capsule-ta0kira.sourceforge.net/
http://capsule-ta0kira.sourceforge.net/#IOS

Kevin P. Barry


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
ta0kira
5/29/2007 12:44:45 AM
Daniel T. wrote:
> In article <f3erhm$fnq$1@mouse.otenet.gr>, Sam <sakarab@yahoo.com>
> wrote:
> 
>> When a contained object member function is called, its "this" pointer
>> must be calculated and passed to it. On the other hand in an inheritance
>> relationship the "this" pointer is the same with the derived object. No
>> calculation needed.
> 
> The above is a micro-optimization that the compiler can likely take care
> of itself.

Our perspective differ. You call it "micro-optimization", I call it "(small)
extra performance", others are concerned about the overhead of a virtual call
and others don't (virtual call's overhead compared to the containment overhead
is almost the same, fetch one extra address, the address of a function in the
first case, the address of the this pointer of the contained object in the
later).

> 
>> Example:
>>
>> struct A
>> {
>>      void do_work();
>> };
>>
>> // containment
>> class B
>> {
>> private:
>>      A  mA;
>> public:
>>      void do_work()      { mA.do_work(); }
>> }
>>
>> // private inheritance
>> class C : private A
>> {
>> public:
>>      void do_work()      { A::do_work(); }
>> }
>>
>> int main()
>> {
>>      B    b;
>>
>>      // gets address of b, calculates address of
>>      // B::mA and calls A::do_work()
>>      b.do_work();
>>
>>      C    c;
>>
>>      // gets address of c, directlly calls A::do_work()
>>      c.do_work();
>> }
> 
> In the above code, the B::do_work function would likely be expanded
> inline which means the "calculation" you speak of is done at compile
> time, not run time. No performance advantage here.
> 

There are cases where the compiler can optimize the "calculation" / passing of
the this pointer, if for example

1. the address of the container object is the same with the contained object
2. the code of the A::do_work() function is known to the compiler not to use
any class member variables or methods so it doesn't need a this pointer
3. the called functions is known to access only class member variables that
can be calculated as offset from the address of the container object.

The above list of course is not exhaustive and is implementation dependent.
But private inheritance is not (implementation dependent).

Sam.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Sam
5/29/2007 4:49:44 PM
Daniel T. wrote:
> Sam <sakarab@yahoo.com> wrote:
>> Daniel T. wrote:
>>> Sam <sakarab@yahoo.com> wrote:
>>>
>>>> But I feel that there is a legitimate use of private inheritance
>>>> when a single condition is met (the base class has no virtual
>>>> functions, so inheriting from your class will not have a
>>>> customization point you don't intent to give) and the (small)
>>>> extra performance private inheritance gives is needed.
>>>>
>>>> Any comments on my thinking.
>>> Just the opposite is true.
>> I don't really understand what your point is. Can you elaborate
>> please?
> 
> Maybe the FAQ will help:
> http://www.parashift.com/c++-faq-lite/private-inheritance.html#faq-24.3
> 
> My point is that a legitimate use of private inheritance is when the
> base class *does* have at least one virtual function, and you want to
> override that function, but don't want the child class to be convertible
> into the parent class.
> 

I feel there is a misunderstanding going on here and after (re)reading my
original post it possibly is my fault.

Please change the words "But I feel that there is a legitimate use of private
inheritance" with "But I feel that there is **one more** legitimate use of
private inheritance".

Does this make a difference?

Sam.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Sam
5/29/2007 4:50:14 PM
On 5/29/07 4:49 PM, in article f3i6uv$pmu$1@mouse.otenet.gr, "Sam"
<sakarab@yahoo.com> wrote:

> Daniel T. wrote:
>> In article <f3erhm$fnq$1@mouse.otenet.gr>, Sam <sakarab@yahoo.com>
>> wrote:
>>
>>> When a contained object member function is called, its "this" pointer
>>> must be calculated and passed to it. On the other hand in an inheritance
>>> relationship the "this" pointer is the same with the derived object. No
>>> calculation needed.
>>
>> The above is a micro-optimization that the compiler can likely take care
>> of itself.
>
> Our perspective differ. You call it "micro-optimization", I call it "(small)
> extra performance", others are concerned about the overhead of a virtual call
> and others don't (virtual call's overhead compared to the containment overhead
> is almost the same, fetch one extra address, the address of a function in the
> first case, the address of the this pointer of the contained object in the
> later).

There is no "extra performance" obtained by using private inheritance
instead of containment in the example below - because the
"computational work" required by the semantics of either approach is
the same. In both cases, two methods are called and each is passed a
"this" pointer (at least conceptually) as a hidden argument. Since
neither of the "this" pointer arguments so passed is any more
expensive for the compiler to obtain than the other - and since
obtaining neither pointer requires any additional runtime information
over and above what is needed to obtain the other pointer - there is
no basis for concluding that private inheritance offers any
performance advantage (however minuscule) over containment.

In particular, any comparison between containment and virtual method
dispatching is simply erroneous. The compiler does not need b's
address in order to obtain b.mA's address. Because b.mA is located at
a known location within a B object (which in the code below happens to
be zero), the compiler can just as easily pass mA as a "this" pointer
argument as it can a pointer to b itself.

And real-world C++ compilers bear this observation out: on a typical
machine architecture, local variables are referenced as offsets
relative to a stack pointer. So, for example, if b is located at
0(SP), then mA would also be found at 0(SP) (in the example below) -
but even if mA were located 4(SP) or 8(SP) or wherever - there would
be no additional overhead incurred: instead of passing 0(SP) to each
of the two methods, the compiler would pass 0(SP) to the first method
and 4(SP) to the second and do so no less efficiently.

>>
>>> Example:
>>>
>>> struct A
>>> {
>>>      void do_work();
>>> };
>>>
>>> // containment
>>> class B
>>> {
>>> private:
>>>      A  mA;
>>> public:
>>>      void do_work()      { mA.do_work(); }
>>> }
>>>
>>> // private inheritance
>>> class C : private A
>>> {
>>> public:
>>>      void do_work()      { A::do_work(); }
>>> }
>>>
>>> int main()
>>> {
>>>      B    b;
>>>
>>>      // gets address of b, calculates address of
>>>      // B::mA and calls A::do_work()
>>>      b.do_work();
>>>
>>>      C    c;
>>>
>>>      // gets address of c, directlly calls A::do_work()
>>>      c.do_work();
>>> }
>>
>> In the above code, the B::do_work function would likely be expanded
>> inline which means the "calculation" you speak of is done at compile
>> time, not run time. No performance advantage here.
>
> There are cases where the compiler can optimize the "calculation" / passing of
> the this pointer, if for example
>
> 1. the address of the container object is the same with the contained object
> 2. the code of the A::do_work() function is known to the compiler not to use
> any class member variables or methods so it doesn't need a this pointer
> 3. the called functions is known to access only class member variables that
> can be calculated as offset from the address of the container object.
>
> The above list of course is not exhaustive and is implementation dependent.
> But private inheritance is not (implementation dependent).

Compiled code is always "implementation-dependent." Eliminating a
second load instruction to pass the "this" argument to the second
method is just as much an optimization as optimizations #1-3 on the
list above. So when comparing the efficiencies of alternate
approaches, it only makes sense to assume an optimally efficient C++
compiler. Otherwise, if one is going to assume that the C++ compiler
does not produce optimally efficient code - then one cannot also
assume that the inefficiencies of the compiler-generated code (and
likewise, whatever optimizations the compiler did apply) will only
favor private inheritance. Yet that is exactly the argument that is
being made here: that the compiler will be smart enough to optimize
away a second load instruction for a this pointer argument when
calling the second method - but at the same time the compiler cannot
be smart enough to eliminate the load instructions completely because
they are not being used at all.

Greg


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Greg
6/1/2007 6:53:04 AM
Reply:
Similar Artilces:

bug in inspect (was cgitb vs traceback)
Hi, I took part in the python bugday and fixed this bug as well as a cgitb bug (and one unrelated). A. Kuchling committed into 2.4a0 and I think into 2.3, but I'm not sure if that was 2.3.4 or 2.3.5. -- Robin Becker Robin Becker wrote: > Hi, I took part in the python bugday and fixed this bug as well as a whoops this was s'posed to go to an interested party. -- Robin Becker ...

2PCs, 2 NICs, 1 private 1 public. No Ping on private!!
On Win2K3, I have 2 network cards. 1 named public, other private. Public is working ok on a domain, ie: I can ping other machines on the domain ok. On 2 of the machines (each with 2 NICs), I added a private address and name in drivers/etc/hosts file. I added the same private IP Address for the card statically. No DNS settings entered. I cannot ping the private machines. If I disable the public card then I can ping them. I have ordered the bindings to be public first on each machine. WHat am I missing to get the 2 private machines to be able to ping each other whilst the pub...

mdlState_startModifyCommand vs userState_reset
Hello, I'm actually converting an application from SE to V8 and my goal is to be able to distinguish these three situations after calling mdlState_startModifyCommand : 1. When a user click reset button : 2. When a user click data button in an empty aera 3. When a user click onto an element but reject it (an all others) until there is no more element. Formely, the application check (into the "userState_reset" function) the "tcb->relerr" variable who take the value 21 if situations 2 and 3 were encountered. But within V8, ...

Jbase vs. Universe
Okay this will most likely open a can of worms but.... Can I get some input on Jbase vs. Universe, pros and cons of both and if you had to choose which you would pick and why. Richard Kann Comp-Ware Systems, Inc. In article <3F38016D.7070502@comp-ware.net>, eugene@comp-ware.net says... > Okay this will most likely open a can of worms but.... > > Can I get some input on Jbase vs. Universe, pros and cons of both and if > you had to choose which you would pick and why. I migrated from AP/Pro to jBASE in '96, but the other platform I really conside...

7.1 Pre-Release and flash and firefox3 vs. firefox 2
I currently have flash running fine for Firefox-2.0.0.16 using a link in my .mozilla's plugins folder. If I build Firefox-3.0.2 from ports it appears to use this same .mozilla folder for its configs but flash doesn't work. Is it looking for plugins in a different location than firefox 2? thanks, tf ...

Problems with the composition over inheritance paradigm
Hello everybody, the GoF book states on multiple occasions that object composition should be preferred over inheritance whenever possible. I have come to highly value this suggestion because it drastically reduces the complexity of inheritance trees and all the accompanying maintainability issues. But there are cases where I have problems finding a reasonable implementation for these composite structures. Consider some kind of TObjectList that shall be equipped with a MaxEntries property to limit its maximum capacity and other additional properties as well, making it a, say, TCon...

how to start use nested STL container
Hi,all I want to learn something about nested stl containers, but i can't find any tips on it(such as faq, c++ books etc), so anybody can give a good link (or good book) which talk about it? It's peffect if it have some examples. Thanks all. On 2007-08-27 11:52, guorke wrote: > Hi,all > I want to learn something about nested stl containers, but i > can't find any tips on it(such as > faq, c++ books etc), so anybody can give a good link (or good book) > which talk about it? > > It's peffect if it have some examples. There's really not...

C Containers library #3
The C Containers library project aims to replicate most of the functionality of C++ STL in C. This project is available at http://code.google.com/p/ccl/ All source code is freely available, with no restrictions for either personal or commercial use. Available containers are lists, flexible arrays, string container, hash tables, and many others. Why reinvent the wheel? Download the ccl and enjoy. jacob jacob navia <jacob@spamsink.net> wrote: > Why reinvent the wheel? Because I don't want your tractor wheels on my twoseater sportscar. Richard ...

declaration of an incomplete private type before the private part
hi guys, I'm very newbye to ADA, so my apologizes in advance. My problem: I need to do a declaration such as: ----------------------------------------- .... type ListNode is private; type List is private; package IterList is new Iterators (Creator => List, Item => ListNode, getFirst => Lists.getFirst, getNext => Lists.getNext, isLast => Lists.isLast); function makeIter (L : List) return IterList.Ite...

java - public interface
.... warning - I'm more familiar with C++ but I'm learning Java for new project. I'll try hard not to troll. ...Say I have a class that exposes some interfaces. The intent is that methods may be overridden by clients but only the class that defines the interfaces are allowed to call them.In C++ you would do it like so:class X{ public: class Y { friend class X; private: virtual void = 0; }; void YConsumer( Y & y ) { y.FuncOnlyForX(); }};class YClient : public X::Y{ public: void FuncOnlyForX() // override X::Y { std::cout << &...

elisp byte compile problem: emacs 23.1 vs 23.2
Stung by a emacs byte-compile problem. Cost: 2 hours. Summary: if you are doing elisp dev on more than one machine, best to re-byte-compile the files on the machine if you run into some strange errors. Byte compiled elisp files should work cross-platform for emacs 23.2. It has been working between my Windows Vista and Mac 10.4.x in the past year. Today, i just byte compiled the whole dir of elisp files on our ErgoEmacs source trunk, then synced over to my Mac as a regular routine, then started emacs on my Mac. I keep getting this strange error on my Mac: Wrong number of arguments: called-in...

if-then vs. if-generate
Why lables are mandatory for generate statemente? Why *else* cannot be used with *generate*? For example, it should be quite typical situation, you have two different implementations of the same block depending on a generic. B1: if Param1 generate ... end generate; B2: if not Param1 generate ... end generate; Wouldn't it be more neat to allow the following implementation of generate block: B1: if Param1 generate ... else ... end generate; ???? Thanks. On Sat, 21 Feb 2004 14:11:46 +0200, "valentin tihomirov" <...

static array initialization and private copy ctor
g++ complains about illegal access to a private member when the following is compiled with a private copy constructor for the class C. When the copy constructor is public, the program runs and demonstrates(?) that the copy constructor is never called (at least no sign of its chatter on std::cout is visible). So - is it necessary to have a public copy constructor in order to use "function style" initializers for an array of objects? Or is this a bug in g++? [jsalmon@river c++]$ cat arrayinitializer.cpp #include <iostream> struct C{ int i; C(int i_) : i(i_){ ...

Private members and copy constructors
aclass A, B; Can A access B's privates all the time, or only in a copy constructor? -------and--------- This code: #include <iostream> class A { int my; public: A():my(0){} void print(){std::cout<<my<<std::endl;} void test(A x){x.my++;} }; int main() { A a, b; a.test(b); a.print(); b.print(); } Produces "0 0" when run. Expected "0 1" or compile error. -------------------- Please tell me this is one of those staying-up-late mistakes :-) Thanks, Will Full Decent wrote: > aclass A, B; > > Can A access B...

HP 5500c vs. HP5530c
Hi all, I bought an HP 5500c cause I wanted a scaanner with a photo feeder. After I bought it, I found out that it has been discontinued, and replaced by the HP5530c. My problem is, should I return the HP5500c and go buy the HP5530c, or not. Any opinions? Is the HP 5530c faster? Are they both really USB 2.0? Is the feeder better on one than the other? Thanks for any response, John I got the 5530 a month ago.. $169 +tax after rebate... I'm not sure of the diffences but the 5530 is USB 2.0... I never could find many good real reviews online for the 5530, only ...

Zoom Hayes H08-15810 vs Zoom X3 5560
Hello people, Actually, the subject says it all. I am about to buy a budget ADSL modem and the alternatives are Hayes (Zoom) H08-15810 and Zoom X3 5560 To my liking, the Hayes one is cheaper, but the brochure specifically states that it is based on an LSI chipset (what is this - is it good or bad?) We have been using the X4 version of the Zoom for a while now, without major problems except for occasional disconnections which get fixed after power-cycling the modem. I will appreciate any comments/pointers deeply. Many thanks in advance, -arifi "Arifi Koseoglu" <someone@som...

[ace-users] Virtual inheritance between ACE_Service_Object, ACE_Task_Base, and ACE_Task
ACE VERSION: 5.4.4 HOST MACHINE and OPERATING SYSTEM: Fedora Core 3 (x86) TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): g++ (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) CONTENTS OF $ACE_ROOT/ace/config.h: #define ACE_HAS_IPV6 #include "ace/config-linux.h" CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless this isn't used in this case, e.g., with Microsoft Visual C++): include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/d...

DDS2 vs DDS5 Compatibility
I have two servers (old 43P Model 140) and a new server (Model 550) that both have 4mm tape drives. However, one drive is a 4/8GB DDS2 and the other has a 36/72GB DDS5. They are at different locations that are about 2hrs away from each other. Does anyone know if I create a tape on the DDS2 drive, will the DDS5 be able to read it? I'd like to find this out before I drive the 2hrs there and then have to drive 2hrs back. I think from what I have seen, the older DDS2 will not work, but if it will it would save me several hours of data transfer using a really slow FTP transfer. Thanks in adva...

XML vs Bytestream which is best?
I am looking for a flexible file format for my preference and other data files in my program. I have been using Bytestream format since it is simple to program. It is somewhat flexible with changing formats. For example, if I store a file as a cluster, but then change the cluster in the program to add more elements to the end of it, then I read in the file into the new larger cluster, it will read it in to the first part of the cluster like it should and give me an error denoting that the size wasn't what is expected. This is fine, but limits additions to the end of the cluster. I trie...

Intuition vs following methodology and logic.
How much does intuition play role in your day-to-day SW development? Is it more or less than plainly following some type of methodology like XP or RUP? How many times your intuition helped you to avoid hackerish design and eventually took you to the right path without having solid proof why it was right in the first place? Personally I think Intuition is pattern recognition thus its a very powerful and must have tool for any serious Architect (not professional). Tsolak Petrosian "Tsolak Petrosian" <tsolakp@yahoo.com> wrote in message news:a052897d.0402260815.a2f53a4@posting....

Generic-default : simulation vs. synthesis
Hi, I am trying to do the following: In a package (pkg_generic.vhd) I declare the following types and constants: type type_range is array(1 downto 0) of integer range 0 to 3; type type_lookup is array (natural range <>) of type_range; constant cLookup : type_lookup(1 downto 0) := ( 1 => (2,4), 0 => (0,3) ); Now I have a component with the following declaration: entity test is generic( gLookup : type_lookup(0 downto 0) := cLookup(0); ); port( ...); end test; When compiling in Modelsim I get the following error: "Cannot resolve indexed name as type work.pkg_gen...

create indexes vs enable indexes
if somebody could throw some light, if creating indexes are better than enabling indexes. Also does update stats work better with creating indexes or when indexes are enabled. I was trying to avoid a lengthy discussion, but I guess nobody else is jumping in. I think what you are asking is whether it is better to disable an index, load a bunch of data, and then enable the index. The answer is, of course, that it depends. If you are going to push a lot of data into the table, then it will be quicker to re-create the index. If we are talking one or two rows, then what is the p...

My private picture
Hi, das bin ich - die geile Liana! This is me Liana! More Pics at http://www.geile-tipps.info/gos/ ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- ...

AAPL: 50% more operating income in 2008 vs 2006
PERIOD ENDING 27-Sep-08 29-Sep-07 30-Sep-06 Total Revenue 32,479,000 24,006,000 19,315,000 Op. Income 6,275,000 4,409,000 2,453,000 (All figures x1000) http://finance.yahoo.com/q/is?s=AAPL&annual So, in 2006 operating income was 12.7% of total revenue. In 2008, it was 19.3%. That's an increase of 50% of total revenue. Whereas total revenue has increased by 68%, operating income has increased by 155.8% , more than double the total revenue increase. I understand all you bright people are more into nice pictures than figures -- which, acco...

G5 vs. Dual G4
I've a question on dual-G4 vs. G5 Powermacs. I'm considering geting one of these two options over the next month or so. As a bit of background - the speed of either (if I were to do it 'right now' for instance I'd be talking a 1.6ghz G5 vs. a dual-1.25ghz G4) is going to both be *much* faster then I have now (which is an older x86 machine running linux) and definitely overkill for my needs. One of the things that led me to a single G4 to the G5 was an eye to the future - I konw that most likely the overall speed of the machine would suit me for a few years (unlike 5-10 ye...