Thanks for correcting me. It's good advice that I'm going to start
following in my own project, fclib.sourceforge.net.
> -----Original Message-----
> From: vxl-users-admin@...
> [mailto:vxl-users-admin@... Behalf Of Andrew
> Sent: Monday, January 28, 2002 5:55 AM
> To: 'Peter Vanroose'; 'Rob Campbell'
> Cc: vxl-users@...
> Subject: RE: [Vxl-users] [CONTRIBUTION] vcsl_tutorial.cpp
> Thanks for the contribution Rob!
> The body of the code looks great, but I would suggest that
> the headers are changed to follow the principles in the VXL
> book. To summarize, because they may prove useful:
> 0. Use forward slashes in include lines.
> Very few operating systems use backslash as a filename
> 1. All standard headers included as <x> should use <vcl_x.h>
> This is the only supported way to get cross-platform
> 2. Order from general to specific.
> Think of inheritance -- the more general (base) class must
> be defined before the more specific (dervied) class.
> If this order is not possible -- i.e. there is a cycle,
> that's a bug in the libraries, and should be fixed.
> Note that vcsl depends on vnl, so vnl headers should be
> included first.
> 3. Use <> rather than "".
> Safety -- one might copy the example file elsewhere, to
> a directory with confusing contents. The -I flags should
> control the order of search, not the contents of the current
> 4. The exception to 2 and 3 is the header file corresponding
> to the current .cxx file. This should be included at the
> top of file.cxx, in "", with no path.
> If the .h is at the top of the file, it ensures it's
> free-standing and doesn't have any hidden dependencies.
> Forces the .cxx and .h to be copied together, as a change
> in the cxx will probably require a change in .h, and on many
> compilation environments, it's hard to get the cxx right
> unless the compiler includes exactly the correct .h.
> So, in the supplied example, the head of the file should be
> #include <vcl_iostream.h>
> #include <vxl/vxl/vnl/vnl_math.h>
> #include <vxl/vxl/vcsl/vcsl_cartesian_3d.h>
> #include <vxl/vxl/vcsl/vcsl_translation.h>
> #include <vxl/vxl/vcsl/vcsl_rotation.h>
> #include <vxl/vxl/vcsl/vcsl_displacement.h>
> #include <vxl/vxl/vcsl/vcsl_graph.h>
> Vxl-users mailing list