General Assignment and Mutator Helper Functions

Access Full Text

General Assignment and Mutator Helper Functions

For access to this article, please select a purchase option:

Buy chapter PDF
£10.00
(plus tax if applicable)
Buy Knowledge Pack
10 chapters for £75.00
(plus taxes if applicable)

IET members benefit from discounts to all IET publications and free access to E&T Magazine. If you are an IET member, log in to your account and the discounts will automatically be applied.

Learn more about IET membership 

Recommend Title Publication to library

You must fill out fields marked with: *

Librarian details
Name:*
Email:*
Your details
Name:*
Email:*
Department:*
Why are you recommending this title?
Select reason:
 
 
 
 
 
A Guide to MATLAB® Object-Oriented Programming — Recommend this title to your library

Thank you

Your recommendation has been sent to your librarian.

Author(s): Andy H. Register
Source: A Guide to MATLAB® Object-Oriented Programming,2007
Publication date January 2007

In the constant quest for software quality, consistent interfaces and modular code are very important. In light of this, there is a need to turn attention on get and set. If you examine the current implementations of get or set, the logic in almost every case statement is different. These differences are currently necessary because the interface for each public variable is unique. It is preferable to keep the group-of-eight functions as uniform as possible and that means trying to move interface differences out of get and set. A helper-function technique is developed that pushes most of the differences out of get and set and into the helper. This technique will improve code modularity and improvements in modularity directly relate to improvements in code quality. As always, the driving force is code quality. As the public interface grows in complexity, it would be bad if the complexity of get and set grew faster than the interface.

Chapter Contents:

  • 16.1 Helper Function Strategy
  • 16.1.1 Direct-Link Public Variables
  • 16.1.1.1 get and subsref
  • 16.1.1.2 set and subsasgn
  • 16.1.2 get and set Helper Functions
  • 16.1.2.1 Helper functions, get, and set
  • 16.1.2.2 Final template for get.m
  • 16.1.2.3 Final Template for set.m
  • 16.1.2.4 Color Helper Function
  • 16.1.2.5 The Other Classes and Member Functions
  • 16.2 Test Drive
  • 16.3 Summary
  • 16.4 Independent Investigations

Inspec keywords: software quality; object-oriented methods

Other keywords: mutator helper function; helper-function technique; code quality; get function; set function; software quality; group-of-eight function; code modularity

Subjects: Object-oriented programming; Software engineering techniques

Preview this chapter:
Zoom in
Zoomout

General Assignment and Mutator Helper Functions, Page 1 of 2

| /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch16-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch16-2.gif

Related content

content/books/10.1049/sbpc001e_ch16
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading