- Assignment Operator Inline
- Specifies whether the generated assignment operator is declared
as inline.
- Assignment Operator Visibility
- Specifies the visibility of the generated assignment operator.
- Class Kind
- Defines the kind of C++ construct that is generated for the class
element. Possible values are class, struct, union, typedef,
and none.
If Class Kind is set to typedef,
the Implementation Type property is used to specify the type.
- Copy Constructor Explicit
- Specifies whether the generated copy constructor is declared as
explicit.
- Copy Constructor Inline
- Specifies whether the generated copy constructor is declared as
inline.
- Copy Constructor Visibility
- Specifies the visibility of the generated copy constructor.
- Default Constructor Explicit
- Specifies whether the generated constructor is declared as explicit.
- Default Constructor Inline
- Specifies whether the generated constructor is declared as inline.
- Default Constructor Visibility
- Specifies the visibility of the generated constructor.
- Destructor Virtual
- Specifies whether the generated destructor is declared as virtual.
- Destructor Inline
- Specifies whether the generated destructor is declared as inline.
- Destructor Visibility
- Specifies the visibility of the generated destructor.
- Equality Operator Inline
- Specifies whether the generated equality operator is declared
as inline.
- Equality Operators Visibility
- Specifies the visibility of the generated equality operator.
- Generate Extraction Operator
- Specifies whether the extraction operator is generated automatically.
- Generate Insertion Operator
- Specifies whether the insertion operator is generated automatically.
- Generate Assignment Operator
- Specifies whether the assignment operator is generated automatically.
The generated assignment operator provides a memberwise assignment
of each attribute from the source object.
Note: The generated assignment
operator copies only pointers, and not pointed-to values. If a class
has pointers, you should create your own explicit assignment operator.
You
can overload this property by creating your own assignment operator
on the class. If you create your own assignment operator and if the
Generate Assignment Operator option is selected, the C++ code generator
recognizes that an assignment operator exists and does not generate
another one.
Note: If you declare a private assignment operator,
ensure that the Generate Assignment Operator option is cleared.
- Generate Class
- Determines if the transformation generates a class, interface,
or enumeration. If the Generate Class check
box is not selected, the C++ transformation does not generate a definition
for this class. This property should be used when you modeled code
that has already been implemented outside the tool, and does not need
to be generated.
For example, it is common to create a class that
is a placeholder for an external data type. This option allows you
to specify the data type in a protocol and use it for modeling purposes.
If you leave the Generate Descriptor (class, C++ TargetRTS) property
set, a type descriptor can still be generated even if the class is
not.
Even if the Generate Class property is not selected you should
set the Class Kind property so that the C++ transformation can generate
forward references when needed.
- Generate Copy Constructor
- Specifies whether the copy constructor is generated automatically.
The generated copy constructor provides a memberwise construction
of each attribute from the source object.
Note: The generated copy
constructor copies only pointers and not pointed-to values. If a class
has pointers, you should create your own explicit copy constructor.
You
can overload this property by creating your own copy constructor on
the class. If you create you own copy constructor and the Generate
Copy Constructor option is selected, the C++ code generator recognizes
that a copy constructor already exists, and does not generate another
one.
Note: If you declare a private copy constructor, ensure that
the Generate Copy Constructor option is not selected.
- Generate Default Constructor
- Specifies whether the default constructor is generated automatically.
The generated default constructor initializes the attributes of the
class with their initial values.
The way in which the class attributes
are initialized depends on the kind of attribute (for example, array
or other) combined with the value of the Initializer Kind (attribute,
C++) property. Arrays are initialized by using a memberwise assignment
loop, and other attributes can either be initialized via the constructor
initialization list or by assignment.
You can overload this
property by creating your own default constructor on the class. In
these cases even if the Generate Default Constructor check box is
selected, the C++ transformation recognizes that a constructor already
exists and does not generate another.
Note: When you overload the
default constructor on a class, the initial values of the attributes
are not used during code generation.
- Generate Destructor
- Specifies whether the destructor is generated automatically. The
generated destructor is empty unless any operations have the Call
From Destructor (Operation, C++) property selected.
You can overload
this property by creating your own destructor on the class. In these
cases even if the Generate Destructor property is enabled, the C++
code generator recognizes that a destructor already exists and does
not generate another.
- Generate Equality Operator
- Specifies whether the equality operator is generated automatically.
The generated equality performs a memberwise equality check.
If
you choose for the transformation to not generate these operators,
you can define your own. If both == and != are generated, the Inline check
box for != is meaningless, because the transformation generates the
!= as an inline call to the negation of ==.
- Generate Inequality Operator
- Specifies whether the inequality operator is generated automatically.
If
you choose for the transformation not to generate these operators,
you can define your own. If both == and != are generated, the Inline check
box for != is meaningless, because the transformation generates the
!= as an inline call to the negation of ==.
- Generate State Machine
- Determines if the transformation generates a state machine. This
check box is selected by default.
- Header Preface
- Specifies the text that appears immediately before the declaration
of the class in the header file.
- Header Ending
- Specifies the text that appears immediately after the declaration
of the class in the header file.
- Implementation Preface
- Specifies the text that appears immediately before the class implementation.
- Implementation Ending
- Specifies the text that appears immediately after the class implementation.
- Implementation Type
- Provides the type for the typedef when the Class Kind (Class,
C++) property is set to typedef.
For example, the following code
is generated by creating a class named MyString, setting the Class
Kind to typedef, and setting the Implementation Type to char[30]:
typedef char MyString[30];
- Inequality Operator Inline
- Specifies whether the generated inequality operator is declared
as inline.
- Inequality Operators Visibility
- Specifies the visibility of the generated inequality operator.
- Private Declarations
- Specifies text that appears in a private section of the class.
- Protected Declarations
- Specifies text that appears in a protected section of the class.
- Public Declarations
- Specifies text that appears in a public section in the class.