Properties of Member Functions in C++

Home - About » Computer Science - Industry Work - Publications
Computer Science
Research, Industry Work,
Programming
Community Service
Hillside Group, CHOOSE,
Stanford GSA
The Serious Side
Business School,
Learning Chinese
Humorous Takes
Switzerland, United States,
Software, Fun Photos
Travel Stories
Europe, United States, Asia
  
Living Places
Berlin (+ Gallery), Zürich
Boston, S.F. + Bay Area

As C++ developers, we talk a lot about member functions (methods) of a class. We talk about member function types like getters and setters, command methods, and factory methods. Next to classifying member functions by purpose, we also talk about properties of member functions like being a primitive or composed method, a hook or template method, a class or instance method, or a convenience method.

Obviously, we have a large vocabulary for talking about member function types and properties. We use this vocabulary to communicate and document different aspects of a member function, for example, what it is good for, who may use it, and how it is implemented. Understanding this vocabulary is a key to fast and effective communication among developers.

In a previous article, we discussed several key types of member functions [1]. This article presents seven key properties of member functions that we use in our daily design and programming work. It illustrates them using a running example and catalogs them for use as part of a shared vocabulary. Some of the method properties have their own naming convention. Mastering this vocabulary helps us better implement our member functions, better document our classes, and communicate more effectively.


Dirk Riehle and Steve Berczuk. "Properties of Member Functions in C++." Unpublished manuscript, originally scheduled for publication in C++ Report (2000).

For the time being, a copy is available as a PDF file.

Copyright (©) 2007 Dirk Riehle. Some rights reserved. (Creative Commons License BY-NC-SA.) Original Web Location: http://www.riehle.org