Design new API function to reduce duplicationBRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Ishwerdas, Ch3ckTags: C, code, API, design

This task involves designing a new function that will measurably help reduce code duplication. You'll need to have already identified a piece of duplicated code that needs to be refactored and/or modified.

This task involves writing just the header file declaration and a doxygen comment that fully describes how the function behaves. It is your responsibility to make sure that the return types and function arguments are well thought out, fit well with our existing conventions, and is a clean simple yet effective design. Think it through.

Submit a patch file with your change, modifying the corresponding public include/header file that goes with the library being modified.

Note candidate libraries to modify are our core libraries:

  • libbu for basic utility functions
  • libbn for basic math and simple geometry functions
  • librt / libnmg / libbrep for more complicated geometry functions
  • libanalyze for analysis functions
  • libged for geometry editing (commands)
  • ... see src/README for a brief listing
Uploaded Work
File name/URLFile sizeDate submitted
task-7-new-api.tar.gz1.5 KBDecember 04 2014 22:25 UTC
Comments
Andromeda Galaxyon December 4 2014 20:08 UTCTask Claimed

I would like to work on this task.

Deepak on December 4 2014 20:55 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!

Andromeda Galaxyon December 4 2014 22:25 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 5 2014 06:58 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 5 2014 07:04 UTCexcellent analysis

Andromeda, thanks for providing a detailed rationale write-up that explains the two choices. My initial inclination given your analysis would be to go with the version that has the ability to return the number of chars scanned.  Having others that don't need that value pass NULL is not really a burden.


A follow-on task has been queued to implement this function.