EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: class library header file naming and install conventions
From: Ralph Lange <[email protected]>
To: "'EPICS core-talk'" <[email protected]>
Date: Tue, 15 Mar 2011 12:41:51 +0100
On 15.03.2011 00:11 Jeff Hill wrote:
All,

When designing a C++ class library whose name is pdq it seems that one might
implement one header file for every exported class, and follow some naming
rules.

Here is a straw-man. Lots of other schemes are possible, and the only really
bad scheme is to follow no naming convention at all, I suppose.

o The C++ namespace is pdq (class lib names must be all lower case letters)
o The master header file's name is pdq.h
o Each exported class named Xxxx has a header file named pdq/Xxxx.h
o The master header file has '#include "pdq/Xxxx.h"' for each exported class
o The pdq.h is installed to $(EPICS_BASE)/include/pdq.h
o The pdq/Xxxx.h are installed to $(EPICS_BASE)/include/pdq/Xxxx.h
o The build system appears to implement this type of install now if, in the
build area, one has something like src/pdq/lib/pdq which contains the header
files (where they are installed from). Is that what we want? That (redundant
pdq in the path) could be initially somewhat confusing to the uninitiated,
and I don’t see any reason to place the header files in a subdirectory other
than to avoid changing the build system?

Change the build system to use a simpler path.

o The c/c++ files are named src/pdq/lib/Xxxx.cpp

If pdq consists of the library, nothing else, I would even skip the /lib/ part of the path.

o The documentation master goes in src/pdq/doc/pdq.html
o Maybe the class interface documentation goes in src/pdq/doc/pdq/Xxxx.html
(same concerns about redundant pdq in the path)

Documentation should be installed. (To allow for documentation to be generated from the source files, e.g. Doxygen. And to make creating binary packages easier.)
Probably into $(EPICS_BASE)/doc/pdq.

We should also have a standard place for unit tests for libraries.
Probably src/pdq/test for your example.

Cheers,
~Ralph


Replies:
RE: class library header file naming and install conventions Jeff Hill
References:
class library header file naming and install conventions Jeff Hill

Navigate by Date:
Prev: class library header file naming and install conventions Jeff Hill
Next: Re: class library header file naming and install conventions Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: class library header file naming and install conventions Jeff Hill
Next: RE: class library header file naming and install conventions Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024