Re: Defining many classes in a single file
From: Senapathy (senapathy.k_at_siemens.com)
Date: 07/14/04
- Next message: Anil Mamede: "Re: Looking for a compiler"
- Previous message: Ingo Nolden: "boost::spirit::actor doesn't accept a std::vector<int>"
- In reply to: Aguilar, James: "Re: Defining many classes in a single file"
- Next in thread: Marcelo Pinto: "Re: Defining many classes in a single file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 14 Jul 2004 14:03:48 +0530
"Aguilar, James" <jfa1@cec.NOBOTSwustl.edu> wrote in message
news:cd2m8j$sj8$1@newsreader.wustl.edu...
>
> "Senapathy" <senapathy.k@siemens.com> wrote in message
> news:cd2l4e$t0u$1@news.mch.sbs.de...
> >
> > [snip]
>
> Followup question:
>
> Won't having a whole bunch of different source files (say, put in a
> subdirectory) be hell for the makefile? I can imagine a rule that says:
>
> 2dphysics.o: $(CCC) $(CFLAGS) ...(200 shape implementation files) shape.h
>
> What do you do about that?
>
>
I suppose, you meant the linking part.
Each source (implementation) file would contribute to 1 object file each. So
the make file would contain some 200 lines for producing these 200 .o files.
Hmm... the _linker_ would need some 200 object files.
But I suppose the IDE should remove the complexity from the build procedure.
Even a batch mode should not be too much of a problem if you want to
automate the build procedure. Some IDEs provide a mechanism to export a make
file from the present source file / header file list.
I would still prefer factored implementations because of the maintenace
aspect. Ultimately that would matter more than the build procedure.
If you have some source control / configuration management scheme, all these
things would not matter at all. Source code readability, maintainability
would server you in good stead.
However, since you mentioned that there would be around 200 implementation
files, maintaining these files also would prove cumbersome.
So I guess you need to arrive at a logical grouping of these files and club
some implementations together. I have done it also under some circumstances,
so I can't say it is such a bad thing either :-)
Senapathy
- Next message: Anil Mamede: "Re: Looking for a compiler"
- Previous message: Ingo Nolden: "boost::spirit::actor doesn't accept a std::vector<int>"
- In reply to: Aguilar, James: "Re: Defining many classes in a single file"
- Next in thread: Marcelo Pinto: "Re: Defining many classes in a single file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|