[gmpi] Re: conventions opinions
- From: "Koen Tanghe" <koen@xxxxxxxxxxxxxxxxxxx>
- To: <gmpi@xxxxxxxxxxxxx>
- Date: Sun, 6 Mar 2005 22:49:08 +0100
On Sunday, March 06, 2005 3:09 AM [GMT+1=CET],
Tim Hockin <xxxthockin@xxxxxxxxxxxxx> wrote:
> Opinion time.
>
>
> I'm organizing files. How do we want to name files?
>
> If I have a class Foo, does it go in Foo.cpp, foo.cpp, or something else?
Personally, I tend to do this:
- put the class definition in a file called Foo.h
- put the class implementation in a file called Foo.cpp
With the following two exceptions (that might not be necessary here, I don't
know):
- inline functions:
put inline function implementations in a file called Foo.inl, and #include
this at the bottom of the Foo.h file
- template functions:
put template function implementations in a file called Foo.tpl, and #include
this at the bottom of the Foo.h file
This is because they have to be defined in every translation unit that uses
them.
(I have also used .cpp for template function implementations, but that was
just because some compilers wouldn't do the syntax highlighting on .tpl
files. You can usually change that somehow nowadays.)
> If I have a class BarInterface, does it go in BarInterface.cpp,
> bar_interface.cpp, barinterface.cpp, or something else?
Since the class name is BarInterface, the implementation file would be
BarInterface.cpp.
My 2 cents,
Koen
----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules: Please stay on topic. You are responsible for your own
words. Please respect your fellow subscribers. Please do not
redistribute anyone else's words without their permission.
Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe
- Follow-Ups:
- [gmpi] Re: conventions opinions
- From: Koen Tanghe
- [gmpi] Re: conventions opinions
- From: Mike Berry
- References:
- [gmpi] conventions opinions
- From: Tim Hockin
Other related posts:
- » [gmpi] conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- » [gmpi] Re: conventions opinions
- [gmpi] Re: conventions opinions
- From: Koen Tanghe
- [gmpi] Re: conventions opinions
- From: Mike Berry
- [gmpi] conventions opinions
- From: Tim Hockin