Home Software Docs Tutorials Demos Databases Dictionaries Models Research Support Mailing Lists What's New
You are here: Standards / General / Tutorials / Software / Home  

 
  Directory Structure
black fading line


Each project is developed under a central directory referenced by an environment variable. At a minimum, the directory should contain the following structure
   isip05_[1]: ls -1F $LINKON
   AAREADME.text
   bin/
   class/
   doc/
   include/
   lib/
   util/
Note that $LINKON is just a name borrowed from one of our projects for demonstration purposes.

  • AAREADME.text serves a few primary functions:

      Contains a full (yet not too detailed) description of the project

      Gives the user detailed installation instructions for the software contained therein

      Describes the contents of each of the underlying directories

    Click here for an example of this type of file

  • bin/ contains all of the binaries associated with the software. For example:
           $LINKON/bin/
           i386_SunOS_5.5.1/
           lk_appbuilder
           lk_channel_handler
           lk_help
           <...>
           sparc_SunOS_5.4/
           lk_appbuilder
           lk_channel_handler
           lk_help
           <...>
           sparc_SunOS_5.5.1/
           lk_appbuilder
           lk_channel_handler
           lk_help
           <...>
           
    Each of the directories under bin references a different architecture and operating system. In this case, we have two directories for Sparc machines and one for an i386 (Intel) machine. Additionally, two are running SunOS v5.5.1 and one is running SunOS v5.4. These directory names are also referenced via the environment variable $ISIP_BINARY which is setup when you log in.

  • class/ contains the files which define each of the C++ classes developed for this project. For example:
           $LINKON/class/
           channel/
           v1.0/
           channel.h
           channel_constants.h
           ch_call_0.cc
           ch_cfg_0.cc
           ch_cfg_1.cc
           <...>
           command_line/
           v1.0/
           command_line.h
           command_line_constants.h
           cmdl_cstr_0.cc	 
           cmdl_cstr_1.cc
           cmdl_dbg_0.cc
           <...>
           data_collect/
           v1.0/
           data_collect.h
           data_collect_constants.h
           dcol_collect_0.cc
           dcol_cstr_0.cc
           data_cstr_1.cc
           <...>
           v1.1/
           data_collect.h
           data_collect_constants.h
           dcol_collect_0.cc
           dcol_cstr_0.cc
           data_cstr_1.cc
           <...>	 
           <...>
           
    In this case, there are three classes shown: channel, command_line, and data_collect. The directory name for each class is the same as the class name ignoring capitalization. Also versions of the class are indicated by the convention of v[MAJOR_REVISION_NUM].[MINOR_REVISION_NUM]. Conventions for naming of class header files and method files are also available.

  • doc/ contains all documentation related to the project. This includes a user's guide and any other operating instructions.

  • include/ contains links to all of the relevant header files used by the software. This is useful, in that it allows one to reference a single directory when building software. For example:
           $LINKON/include/
           channel.h -> ../class/channel/v1.0/channel.h
           channel_constants.h ->
           ../class/channel/v1.0/channel_constants.h
               command_line.h -> ../class/command_line/v1.0/command_line.h
           command_line_constants.h ->
           ../class/command_line/v1.0/command_line_constants.h
           <...>
           
           
    The '->' above indicates that the first file is a link to the second - not a copy.

  • lib/ contains the libraries for the software. Just as the binary files are hardware and operating system dependent, so too are the libraries. Thus, they have the directory structure as follows:
           $LINKON/lib/
           i386_SunOS_5.5.1/
           lib_dcollect.a
           lib_linkon.a	
           sparc_SunOS_5.4/
           lib_dcollect.a
           lib_linkon.a	
           sparc_SunOS_5.5.1/
           lib_dcollect.a
           lib_linkon.a	
           
  • util/ contains the code for each program developed for this project. The naming and structure for the util directory follows a form similar to the class directory. An example is below:
           $LINKON/util/
           lk_driver/
           v1.0/
           lk_driver.cc
           lk_driver.h
           lk_idle/
           v1.0/
           lk_idle.cc
           lk_idle.h
           v2.0/
           lk_idle.cc
           lk_idle.h
           <...>
           
Return to C++ Programming Standards Page
   
   
    Help / Support / Site Map / Contact Us / ISIP Home