MATLAB Link for Code Composer Studio Development Tools    

Some Object-Oriented Programming Terms

As an object-oriented software package, describing how to use the MATLAB Links for Code Composer Studio requires discussing the objects, classes, properties, and methods you use to manipulate and access data. To insure we use the same terms and understand them in the same way, this section provides definitions of some terms commonly used throughout the User's Guide.

Definitions of Useful Object-Oriented Terms

abstract class
a class without instances. Abstract classes expect that their concrete subclasses will add to their structure and behavior.
base class
the most general class in a class structure. Also called root classes, most applications or systems have more than one base class.
behavior
how an object reacts to its methods. How the object state changes in response to one of its methods acting on it.
class
a set of objects that share a common structure and behavior. A class forms the prototype that defines the properties and methods common to all objects of the class. Often, type and class are used interchangeably, although they are slightly different. In this User's Guide the terms are interchangeable.
class diagram
used to show the existence of classes and their relationships. Class diagrams can represent part or all of the class structure of a system.
constructor
a function that creates an object and initializes its state. Constructors can also initialize the state without creating the object.
container class
a class whose instances are collections of other objects in the system. Also called a package.
function
same as method. Used in MATLAB for consistency with other functions. Functions and methods are not quite the same, but used interchangebly in this guide.
handle
a means to access any object that MATLAB Link for Code Composer Studio creates. Used in this User's Guide to refer to the object, interchangeably with object. Often the handle is the name you assign when you create the object. For example, cc is the object and handle when you create a link object.
inheritance
a relationship between classes. One class shares the structure (properties) and behavior (methods) defined in one or more other classes. Subclasses inherit from one or more superclasses, typically augmenting the superclass with their own properties and methods.
instance
Something you can operate on. Instance and object are synonyms and this guide uses them interchangeably.
method
an operation on an object, defined as part of the class of the object. We call this a function.
object
something you can operate on. Objects that are the same class share similar structure and behavior. Or taken another way, a collection of properties and methods. Some sources call properties "variables."
object diagram
shows the existence of objects and their relationships in the logical design of a system. Object diagrams can represent part or all of the class structure of a system.
object-based programming
programming method that organizes programs as cooperative collections of objects, each of which represents an instance of some type, and whose types are members of an heirarchy, united through relationships that are not inheritance relationships.
object-oriented progamming
programming implementation that organizes programs as cooperative collections of objects, each of which represents an instance of some class, and whose classes are members of a heirarchy of classes united through inheritance relationships.
property
part of an object--a variable to some. Also called attribute, it is part of the structure that defines the state of an object.
subclass
a class that inherits from one or more classes, called its superclasses.
superclass
a class that other classes inherit from. The inheriting classes are called subclasses.
state
the accumulated results of the behavior of an object. At any time, the state of an object encompasses the properties of the object and the values for each of the properties.
structure
the concrete representation of the state of an object.

For more information about objects and working with their properties and methods (or functions) refer to Constructing Link Objects.

Determining an Object's Class

After you create an object, use whos to determine the class for your new object (although you should know the class from the input argument you provided to createobj). Being able to query the class for an object is particularly important in this case because the constructor createobj determines the class of the object created--you cannot specify the object class. Depending on the input symbol name you provide to createobj, the returned class changes. So you need to be able to determine the class and whos lets you do this.

Alternatively, using createobj or ccsdsp without the closing semicolon (;) at the end of the command directs MATLAB to display the properties of your new object in the MATLAB window when you create the object.

If you use the MATLAB workspace browser, your object appears in the list of the contents of your workspace, indicating the object type and class--just like whos.


  Introduction to Objects About the Relationships Between Objects