This section contains Class topics.
Name |
Description |
C++ classes offer extensions to the predefined type system. Each class type represents a unique set of objects and the operations (methods) and conversions available to create, manipulate, and destroy such objects. Derived classes can be declared that inherit the members of one or more base (or parent) classes. In C++, structures and unions are considered classes with certain access defaults. A simplified, “first-look” syntax for class declarations is class-key <type-info> class-name <: base-list> { <member-list> }; class-key is one of class, struct, or union. The optional type-info indicates a request for runtime type information about the... more | |
This section contains Friends Of Class topics. | |
The optional member-list is a sequence including, but not exclusive to:
| |
This section contains Inline Function topics. | |
The scope of a class name is local. There are some special requirements if the class name appears more than once in the same scope. Class name scope starts at the point of declaration and ends with the enclosing block. A class name hides any class, object, enumerator, or function with the same name in the enclosing scope. If a class name is declared in a scope containing the declaration of an object, function, or enumerator of the same name, the class can be referred to only by using the elaborated type specifier. This means that the class key, class... more | |
This section contains Keyword this topics. | |
class-name is any identifier unique within its scope. With structures, classes, and unions, class-name can be omitted. See Untagged structures and typedefs for discussion of untagged structures. | |
This section contains Member Scope topics. | |
Class objects can be assigned (unless copying has been restricted), passed as arguments to functions, returned by functions (with some exceptions), and so on. Other operations on class objects and members can be user-defined in many ways, including definition of member and friend functions and the redefinition of standard functions and operators when used with objects of a certain class. Redefined functions and operators are said to be overloaded. Operators and functions that are restricted to objects of a certain class (or related group of classes) are called member functions for that class. C++ offers the overloading mechanism that allows... more | |
This section contains Virtual Base Class topics. | |
The declaration creates a unique type, class type class-name. This lets you declare further class objects (or instances) of this type, and objects derived from this type (such as pointers to, references to, arrays of class-name, and so on): | |
A function declared without the friend specifier is known as a member function of the class. Functions declared with the friend modifier are called friend functions. Member functions are often referred to as methods in Delphi documentation. The same name can be used to denote more than one function, provided they differ in argument type or number of arguments. | |
Syntax | |
In C++Builder, a class method is a method that can be invoked on a class name, as well as on an instance of that class. In contrast, object methods can be invoked only on objects -- instances of a class. | |
Static properties have been implemented in C++Builder 2009 to enhance compatibility with the Delphi language |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|