71 Logical Path

A logical path means a path down from the root of the virtual tree using forward slash delimiters, and without an initial slash.

Consider the part of the virtual tree used for the cxRmi library:

  (root)
    └── Ceda
        └── cxRmi                          <──── project directory has logical path Ceda/cxRmi
            ├── cxRmi.h
            ├── RmiConnection.h
            ├── Rmi.h
            ├── Skeleton.h
            ├── Stub.h
            └── src                        <──── folder for private source files
                ├── cxRmi.cpp
                ├── cxRmi.xcpj             <──── project file
                ├── ResponseQueue.cpp
                ├── ResponseQueue.h
                ├── RmiCallee.cpp
                ├── RmiCallee.h
                ├── RmiCaller.cpp
                ├── RmiCaller.h
                ├── Skeleton.cpp
                ├── StdAfx.cpp
                ├── StdAfx.h
                ├── Stub.cpp
                ├── ThreadBlocker.cpp
                └── ThreadBlocker.h

Logical paths are used for:

  • Identifying a project using the logical path to the project directory. For example the logical path Ceda/cxRmi identifies the project directory for the cxRmi library. These are in turn used for specifying
    • the sub-projects of a project
    • the projects in a given workspace
  • Import statements in Xc++ header files. For example the logical path Ceda/cxRmi/Skeleton.h identifies one of the public header files of the cxRmi library.
  • Identifying a workspace file (extension .xcws) in the virtual tree, which for example allows one workspace to reference another workspace

Logical paths for import statements

The header files directly under the project directory are the public header files of the library which are typically imported as required in other projects

  (root)
    └── Ceda
        └── cxRmi
            ├── cxRmi.h
            ├── RmiConnection.h
            ├── Rmi.h
            ├── Skeleton.h
            └── Stub.h

For example:


// MyFile.cpp

@import "Ceda/cxRmi/RmiConnection.h"
...

Note that Ceda/cxRmi/RmiConnection.h is a logical path and is the recommended way to import header files in Xc++ projects.