diff --git a/doc/xternal.c b/doc/xternal.c
index 6ac2d31090..78f605cc20 100644
--- a/doc/xternal.c
+++ b/doc/xternal.c
@@ -339,6 +339,7 @@
/**@page PROGRAMMING Programming with SCIP
*
* - @subpage CODE "Coding style guidelines"
+ * - @subpage SRCORGA "Organization of source code"
* - @subpage OBJ "Creating, capturing, releasing, and adding data objects"
* - @subpage MEMORY "Using the memory functions of SCIP"
* - @subpage DEBUG "Debugging"
@@ -7848,6 +7849,44 @@
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
+/**@page SRCORGA Organization of Source Code
+ *
+ * The SCIP source code has different types of files, distinguished by their naming style. The following list gives an overview of the most important file types and their purpose.
+ *
+ * @section SRCORGA_CORE SCIP core components
+ *
+ * - Each core component has an implementation with an internal API and a public API.
+ * - The internal implementation should be in a file .c,h
and should not be included in the public API.
+ * - Internal API functions usually do not take a SCIP*
parameter, but a pointer to the component as first argument and pointers to internal structures like SCIP_SET*
or SCIP_STAT*
, where necessary.
+ * - The name of internal API functions follows the style `SCIP...`, e.g., SCIPvarCreate()
or SCIPvarAddLocks()
.
+ * - pub_.h
declares the functions of the public API that do not need a SCIP pointer.
+ * Often, these are getter-functions.
+ * For example, \ref pub_var.h contains public variable API functions.
+ * - Functions in pub_.h
follow the same naming style as those in .h
and are used by the implementation of the internal API as well.
+ * - scip_.h
declares the functions of the public API that need a SCIP instance (SCIP*
), e.g., \ref scip_var.h for public variable manipulation functions.
+ * Functions declared in scip_.h
are often thin wrappers that call the internal API functions from .h
.
+ * These functions should follow the naming style `SCIP...`, e.g., SCIPcreateVar()
or SCIPaddVarLocks
.
+ * - To ensure functions of the public API being reachable in shared libraries, their declaration needs to contain the SCIP_EXPORT
attribute.
+ * - Public types (typedef's, enumerations) are defined in file type_.h
.
+ * Type names follow the style SCIP_...
.
+ * - Structs that need to be accessed by several source files are defined in struct_.h
.
+ * struct_.h
is usually included only by .c
and maybe scip_.c
.
+ * Exceptions are due to manual inlining of functions via macros when compiling for optimized mode.
+ * - All types, structs, and functions are documented with Doxygen-style comments.
+ * The documentation of the implementation of a function must repeat the documentation of the function declaration exactly (for doxygen to treat them as identical).
+ *
+ * @section SRCORGA_PLUGINS Plugins
+ * - Each plugin is defined in files _.c,h
, e.g.,
+ * \ref cons_knapsack.c implements the Knapsack constraint handler plugin and
+ * \ref cons_knapsack.h declares its public API functions.
+ * - Public types that belong to a plugin are declared in its header, _.h
.
+ * - API functions of plugins are named as SCIP...
, e.g., SCIPincludeConshdlrAnd()
, SCIPcreateConsAnd()
, or SCIPgetNVarsAnd()
.
+ * - Plugins access only the public API.
+ * - Plugins that need to be included by default should be registered in src/scip/scipdefplugins.c
.
+ */
+
+/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
+
/**@page TEST How to run automated tests with SCIP
*
* SCIP comes along with a set of useful tools that allow to perform automated tests. The