I<something>

C

Christopher Pisz

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.
 
V

Victor Bazarov

Christopher said:
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
 
P

pallav

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.
 
T

Thomas Matthews

Christopher said:
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
 
C

Christopher Pisz

Thomas Matthews said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top