Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > I<something>

Reply
Thread Tools

I<something>

 
 
Christopher Pisz
Guest
Posts: n/a
 
      04-12-2007
I've seen this alot. I imagine the "I", stand for interface. Usually I see
two files:

SomeClass.h
ISomeClass.h

Can someone explain this practice and what the differance between the two
files should be?



Thanks.


 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      04-12-2007
Christopher Pisz wrote:
> I've seen this alot. I imagine the "I", stand for interface. Usually
> I see two files:
>
> SomeClass.h
> ISomeClass.h
>
> Can someone explain this practice and what the differance between the
> two files should be?


It can mean *I*mplementation. Or it can mean *I*nterface and the
header without it actually contains the implementation and you're not
supposed to use it unless you're actually developing it. It can also
mean *I*nternals. IIRC, in COM it's very common to prepend the name
with 'I' if it's an interface (usually abstract).

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
pallav
Guest
Posts: n/a
 
      04-12-2007
Sometimes you might want to have an internal and external header.
External header is for the external interface
and the internal is for things used inside the package. The internal
header is utilized only by the files within the package, while
anything you want visible to the user of the package should be in the
external interface.

 
Reply With Quote
 
Thomas Matthews
Guest
Posts: n/a
 
      04-13-2007
Christopher Pisz wrote:
> I've seen this alot. I imagine the "I", stand for interface. Usually I see
> two files:
>
> SomeClass.h
> ISomeClass.h
>
> Can someone explain this practice and what the differance between the two
> files should be?
>
>
>
> Thanks.
>
>


Search the web for PIMPL or Pointer to Implementation.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
Reply With Quote
 
Christopher Pisz
Guest
Posts: n/a
 
      04-13-2007
"Thomas Matthews" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Christopher Pisz wrote:
>> I've seen this alot. I imagine the "I", stand for interface. Usually I
>> see two files:
>>
>> SomeClass.h
>> ISomeClass.h
>>
>> Can someone explain this practice and what the differance between the two
>> files should be?
>>
>>
>>
>> Thanks.

>
> Search the web for PIMPL or Pointer to Implementation.
>
> --
> Thomas Matthews
>
> C++ newsgroup welcome message:
> http://www.slack.net/~shiva/welcome.txt
> C++ Faq: http://www.parashift.com/c++-faq-lite
> C Faq: http://www.eskimo.com/~scs/c-faq/top.html
> alt.comp.lang.learn.c-c++ faq:
> http://www.comeaucomputing.com/learn/faq/
> Other sites:
> http://www.josuttis.com -- C++ STL Library book
> http://www.sgi.com/tech/stl -- Standard Template Library



Thank you, that is exactly what I was looking for to solve my "how to give a
user my interface without showing him my private details" problem.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments