I<something>

Discussion in 'C++' started by Christopher Pisz, Apr 12, 2007.

  1. 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.
    Christopher Pisz, Apr 12, 2007
    #1
    1. Advertising

  2. 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
    Victor Bazarov, Apr 12, 2007
    #2
    1. Advertising

  3. Christopher Pisz

    pallav Guest

    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.
    pallav, Apr 12, 2007
    #3
  4. 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
    Thomas Matthews, Apr 13, 2007
    #4
  5. "Thomas Matthews" <> wrote in
    message news:...
    > 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.
    Christopher Pisz, Apr 13, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad Smallridge

    Looking for something others

    Brad Smallridge, May 12, 2005, in forum: VHDL
    Replies:
    4
    Views:
    472
    Brad Smallridge
    May 20, 2005
  2. Guest
    Replies:
    4
    Views:
    475
    Guest
    Oct 13, 2004
  3. Pekka Järvinen
    Replies:
    2
    Views:
    662
    Richard Tobin
    Apr 29, 2008
  4. Replies:
    4
    Views:
    212
    Tad McClellan
    Jun 1, 2007
  5. Replies:
    9
    Views:
    158
Loading...

Share This Page