Coding conventions and principles for a National Land-Change Modeling Framework

Techniques and Methods 6-F1
By:

Links

Abstract

This report establishes specific rules for writing computer source code for use with the National Land-Change Modeling Framework (NLCMF). These specific rules consist of conventions and principles for writing code primarily in the C and C++ programming languages. Collectively, these coding conventions and coding principles create an NLCMF programming style. In addition to detailed naming conventions, this report provides general coding conventions and principles intended to facilitate the development of high-performance software implemented with code that is extensible, flexible, and interoperable. Conventions for developing modular code are explained in general terms and also enabled and demonstrated through the appended templates for C++ base source-code and header files. The NLCMF limited-extern approach to module structure, code inclusion, and cross-module access to data is both explained in the text and then illustrated through the module templates. Advice on the use of global variables is provided.

Suggested Citation

Donato, D.I., 2017, Coding conventions and principles for a National Land-Change Modeling Framework: U.S. Geological Survey Techniques and Methods, book 6, chap. F1, 30 p., https://doi.org/10.3133/tm6F1.

ISSN: 2328-7055 (online)

Table of Contents

  • Abstract 
  • Introduction
  • General Coding Principles and Conventions 
  • Conventions for Achieving Modularity 
  • Naming Conventions
  • Ongoing Development of Conventions 
  • References Cited
  • Appendix 1. Basis for Limited-extern Coding for Modularity
  • Appendix 2. Discussion of the Use of Global Variables 
  • Appendix 3. Template for a Module’s Base C++ Code
  • Appendix 4. Template for a Module’s C++ Header 
  • Appendix 5. Summary of National Land-Change Modeling Framework Coding Principles and Conventions
  • Appendix 6. Summary of Naming Conventions
Publication type Report
Publication Subtype USGS Numbered Series
Title Coding conventions and principles for a National Land-Change Modeling Framework
Series title Techniques and Methods
Series number 6-F1
DOI 10.3133/tm6F1
Year Published 2017
Language English
Publisher U.S. Geological Survey
Publisher location Reston, VA
Contributing office(s) Eastern Geographic Science Center
Description iv, 30 p.
Larger Work Type Report
Larger Work Subtype USGS Numbered Series
Larger Work Title Section F: Land-change modeling and analysis in Book 6: Modeling techniques
Public Comments This report is Chapter 1 of Section F: Land-change modeling and analysis in Book 6: Modeling techniques.
Online Only (Y/N) Y
Additional Online Files (Y/N) N
Google Analytic Metrics Metrics page
Additional publication details