[dia/neduard/update_dev_docs: 14/14] #30: Update HACKING.md.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/neduard/update_dev_docs: 14/14] #30: Update HACKING.md.
- Date: Mon, 22 Apr 2019 08:39:43 +0000 (UTC)
commit 312e2cdc8226364dab4a40deaa455758a42cdbc4
Author: Eduard <eddnicodei gmail com>
Date: Fri Feb 15 14:27:04 2019 +0000
#30: Update HACKING.md.
HACKING.md | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/HACKING.md b/HACKING.md
index b862c59b..81e485f2 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -8,7 +8,7 @@ not duplicated.
For more information on the authors, maintainers, etc., of dia,
please see the file AUTHORS (dynamically generated).
-Visit the dia webpage at https://gitlab.gnome.org/GNOME/dia
+Visit the dia webpage at https://gitlab.gnome.org/GNOME/dia
for more information on the dia mailing list and many other
dia-related things.
@@ -18,16 +18,20 @@ etc., the authoritative list is in app/authors.h.
## Some comments about the source
Everything on the screen 'inherits' from the structure Object
-in lib/object.h. (ps. this is a nice place to start reading the code.).
-Inherits in C means (as in gtk) that it begins with a copy of that structure.
-Some base classes exists in lib/, like element.h (for doing 'box-like'
-objects), connection.h (for doing 'line-like' objects), orth_conn.h (for doing
-connections with orthogonal lines, like the uml-stuff) and render_object.h
-(for doing picture-like objects). These base classes are then subclassed in
-the different object in the object-libraries like objects/standard object/UML
-and object/network.
-
-The objects work by filling out two structures that the main program (app/*)
+in `lib/object.h`. (PS. this is a nice place to start reading the code).
+
+Inherits in C means (as in GTK) that it begins with a copy of that structure.
+Some base classes exists in `lib/`, for example:
+
+- `element.h` (for doing 'box-like' objects)
+- `connection.h` (for doing 'line-like' objects)
+- `orth_conn.h` (for doing connections with orthogonal lines, like the uml-stuff)
+- `render_object.h` (for doing picture-like objects).
+
+These base classes are then subclassed in the different object in the
+object-libraries like objects/standard object/UML and object/network.
+
+The objects work by filling out two structures that the main program (`app/*`)
uses to handle the objects. The ObjectType structure which consists of some
info and a pointer to the type-operations (create+load+save). There's one
ObjectType per object type currently loaded. Then the Object structure, there
@@ -41,7 +45,7 @@ headed (gives all those pita warnings) so that you directly can use the info
stored in the subclasses. Most ops are quite self-describing, and the code can
be copy-pasted from an object like the one you're doing. Rendering to
screen/postscript is done through a 'Renderer' abstraction that can be found
-in lib/render.h.
+in `lib/render.h`.
### XML based objects
You can (from version 0.80) create new objects using a SVG like XML languange.
@@ -57,6 +61,7 @@ When the handle of an object is connected to another object, it's always
on special points called connection points, displayed as crosses.
Implementation:
+
- each object has an array of pointer to ConnectionPoint.
- each object has an array of pointer to Handle.
- each Handle has a pointer to 1 ConnectionPoint (NULL if the handle if
@@ -73,17 +78,14 @@ object.
Static analysis is great!
It is also
[recommended](https://github.com/coreinfrastructure/best-practices-badge/blob/master/doc/criteria.md#static_analysis)
by the Core Infrastructure Initiative.
-We currently support two static analysis tools: clang `scan-build` and coverity.
+We currently support two static analysis tools: clang
[scan-build](http://clang-analyzer.llvm.org/scan-build) [coverity](https://scan.coverity.com/).
### scan-build
-Some of the changes (log message starting with `scan-build`) are suggested
-by [scan-build](http://clang-analyzer.llvm.org/scan-build)
-
See [Meson Documentation](https://mesonbuild.com/Using-multiple-build-directories.html#specialized-uses)
for details on how to use it. The basic idea is that `scan-build` replaces
-environment variables like GCC and GXX custom invocations that perform the
-analysis.
+environment variables like GCC and GXX with custom invocations that perform
+the analysis.
### Coverity
@@ -93,5 +95,3 @@ Dia GNOME has a coverity web-page here: https://scan.coverity.com/projects/dia-g
See https://software.intel.com/en-us/forums/intel-c-compiler/topic/742701 for more details.
Simply use clang for compilation: https://mesonbuild.com/Running-Meson.html
-
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]