Revision: 76283
          http://sourceforge.net/p/brlcad/code/76283
Author:   starseeker
Date:     2020-07-08 14:44:12 +0000 (Wed, 08 Jul 2020)
Log Message:
-----------
Add a note about when to use/not use the libged argc/argv API.

Modified Paths:
--------------
    brlcad/trunk/include/ged.h

Modified: brlcad/trunk/include/ged.h
===================================================================
--- brlcad/trunk/include/ged.h  2020-07-08 14:19:56 UTC (rev 76282)
+++ brlcad/trunk/include/ged.h  2020-07-08 14:44:12 UTC (rev 76283)
@@ -19,11 +19,24 @@
  */
 /** @addtogroup libged
  *
- * Functions provided by the LIBGED geometry editing library.  These
- * routines are a procedural basis for the geometric editing
- * capabilities available in BRL-CAD.  The library is tightly coupled
- * to the LIBRT library for geometric representation and analysis.
+ * Functions provided by the LIBGED geometry editing library.  These routines
+ * are a procedural basis for the geometric editing capabilities available in
+ * BRL-CAD.  The library is tightly coupled to the LIBRT library for geometric
+ * representation and analysis.  The libdm API is assumed for commands that
+ * manipulate geometric views.
  *
+ * A note to C/C++ developers - calling libged's commands programmatically has
+ * a disadvantage compared to calling lower level routines in that input values
+ * must pass through string processing.  In addition to the overhead induced,
+ * this decoupling prevents the compiler from performing a wide variety of
+ * checks and optimizations.  Generally speaking, if you're writing C/C++ code
+ * and are having to construct argc/argv inputs to call a libged function,
+ * you'll want to consider calling lower level routines instead to allow the
+ * compiler to have more insight into what the code is doing.
+ *
+ * If the above isn't possible because the core functionality of the command
+ * is implemented only in libged with no lower level interface available, that
+ * logic is probably a candidate for refactoring.
  */
 /** @{ */
 /** @file ged.h */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to