RAD Studio
ContentsIndex
PreviousUpNext
Classes

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:
  • Data declarations (of any type, including enumerations, bit fields and other classes)
  • Nested type declarations
  • Nested type definitions
  • Template declarations
  • Template definitions
  • Function declarations
  • Function definitions
  • Constructors
  • A destructor
Members of a class can optional have storage class specifiers and access modifiers. The objects thus defined are called class members. The storage class specifiers auto, extern, and register are not allowed. Members can be declared with the static storage class specifiers. 
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  
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!