Tagged value types

 

Overview

The tagged values provided by Objecteering are used to adapt C# semantics to a UML model, in order to generate all C# notions accurately. For example, the notion of extern method in C# does not exist in UML. A {CsExtern} tagged value on a UML operation allows you to specify this characteristic on a model.

 

Note:      Some tagged values can be added to specific model elements directly through the "C#" tab of the auxiliary window. For more information, please see "The auxiliary window and C# Developer".

 

Tagged values on a package

 

Name

Parameters

Role

CsNoCode

N/A

This prevents the generation of code for the package.

CsRoot

N/A

This indicates that the annotated package is the root generation node for your project.

CsNoNamespace

N/A

This prevents generation of the name of the namespace for the annotated package.

CsUse

Names of the imported namespace

This forces a package dependency.

CsName

Name of the namespace

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.
This is particularly useful when developing packages, since it is used to develop a sub-branch of a larger modeling project.

CsNoDirectory

N/A

This prevents the generation of a directory for the package.

CsDirectoryName

Name of the directory

During the generation phase, the parameter of this tagged value takes precedence over the modeling name for the generated directory.

 

 

Tagged values on a class

 

Name

Parameters

Role

CsNoCode

N/A

This prevents the generation of code for the class.

CsAttributeTarget

The targets of the C# attribute

Adds an attribute target to the class if the class is stereotyped "CsAttribute".

CsAttributeAllowMultiple

N/A

Allows multiple C# attributes on a field.

CsAttributeInherited

N/A

Adds the C# attribute inheritance.

CsVisibility

The type of visibility (internal, protected internal, ...)

Defines the visibility of the class.

CsStruct

N/A

Defines the class as being structure.

CsNoInvariant

N/A

Prevents the generation of invariants for the class.

CsImplements

Name of the interface to implement

Forces the implementation of an interface.

CsExtends

Name of the mother class or interface

Forces class inheritance.

CsUse

Names of the imported classes and packages

Imports non-modeled packages and classes.

CsName

Name of the C# class

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

 

Tagged values on a signal

 

Name

Parameters

Role

CsNoCode

N/A

This prevents the generation of code for the signal.

CsVisibility

The type of visibility (internal, protected internal, ...)

Defines the visibility of the signal.

CsTypeExpr

Text for specifying the Signal’s C# type

Generation of the types that cannot be represented in Objecteering.

CsBind

Binded types on the signal

Specifies the types binded by a generic signal.

CsName

Name of the C# signal

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

 

 

Tagged values on an operation

 

Name

Parameters

Role

CsNoCode

N/A

This prevents the generation of code for the operation.

CsName

The operation's name

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

CsUnsafe

N/A

This is used to add the "unsafe" key word.

CsExtern

N/A

This is used to declare the extern operation.

CsVirtual

N/A

This is used to declare the operation as being virtual.

CsSealed

N/A

This is used to declare that the operation cannot be specialized (addition of the "Sealed" key word).

CsNew

N/A

This is used to declare the operation with the "new" key word.

CsVisibility

The type of visibility (internal, protected internal, ...)

This defines custom visibility.

CsOverride

N/A

This adds the "override" key word to the declaration of the operation, so as to declare that it overloads an operation of the parent class.

UseParentPrePostConditions

N/A

If the operation's parent class is a child class, this includes parent pre and post-conditions at the beginning and at the end of the operation.

 

Note:      The {CsSealed} tagged value is obsolete. The "Cannot be specialized" field of the "Operation" dialog box is used to generate the "sealed" keyword.

 

 

Tagged values on an attribute

 

Name

Parameters

Role

CsNoCode

N/A

This prevents the generation of code for the attribute.

CsUnsignedInt

N/A

Declares the attribute as being unsigned int.

CsShort

N/A

Declares the attribute as being short.

CsUnsignedShort

N/A

Declares the attribute as being unsigned short.

CsByte

N/A

Declares the attribute as being byte.

CsSignedByte

N/A

Declares the attribute as being signed byte.

CsLong

N/A

Declares the attribute as being long.

CsUnsignedLong

N/A

Declares the attribute as being unsigned long.

CsDouble

N/A

Declares the attribute as being double.

CsDecimal

N/A

Declares the attribute as being decimal.

CsName

The attribute's name

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

CsVisibility

The type of visibility (internal, protected internal, ...)

Defines a custom visibility.

CsTypeExpr

Text for specifying the attribute's C# type

Generation of the types that cannot be represented in Objecteering (ex : int [ ] [ ]).

CsVolatile

N/A

This adds the "volatile" keyword to the attribute's modifiers.

CsNew

N/A

Adds the "new" keyword to the attribute's modifiers.

CsReadOnly

N/A

This adds the "readonly" keyword to the attribute's modifiers.

CsVirtual

N/A

This adds the "virtual" keyword to the attribute's modifiers, and prevents the generation of accessors.

CsOverride

N/A

This adds the "override" keyword to the attribute's modifiers.

CsSealed

N/A

This adds the "sealed" keyword to the attribute's modifiers.

CsUnsafe

N/A

This adds the "unsafe" keyword to the attribute's modifiers.

CsPropertyName

The name of the property

This allows the modification of the name of the property corresponding to the attribute.

CsPointer

N/A

This declares the attribute as being a pointer (for example, "int*myInteger;").

CsPropertyVisibility

The type of visibility for the relative property (internal, protected internal, ...)

This forces the visibility of the automatically generated property.

CsNoAccessor

N/A

This prevents the generation of the property for the corresponding attribute.

CsConst

N/A

This adds the "const" keyword to the attribute's modifiers.

type

Array, ArrayList, Hashtable, Queue, SortedList or Stack

This defines the type of the collection that must be generated for the current attribute.

 

 

Tagged values on a navigable association

 

Name

Parameters

Role

CsName

Association's name

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

CsNoAccessor

N/A

Non-generation of the accessors

CsSealed

N/A

Representation of the C# keyword "sealed".

CsVolatile

N/A

Representation of the C# keyword "volatile".

type

Array, ArrayList, Hashtable, Queue, SortedList or Stack

This defines the type of the collection that must be generated for the current attribute.

CsNoCode

N/A

This prevents the generation of code for the association

CsNew

N/A

This adds the "new" keyword to the association's modifiers

CsVirtual

N/A

This adds the "virtual" keyword to the association's modifiers and prevents the generation of accessors.

CsOverride

N/A

This adds the "override" keyword to the association's modifiers.

CsUnsafe

N/A

This adds the "unsafe" keyword to the association's modifiers.

CsVisibility

The type of visibility (internal, protected internal, ...)

This defines a particular visibility for the association.

CsConst

N/A

This adds the "const" keyword to the association's modifiers.

CsReadOnly

N/A

This adds the "readonly" keyword to the association's modifiers.

CsNoField

N/A

This prevents the generation of the association but allows the generation of its properties. The "CsGetCode" and "CsSetCode" notes are used to define the code of the get and set properties of the association.

CsPropertyVisibility

The type of visibility for the relative property (internal, protected internal, ...)

This forces the visibility of the automatically generated property, and prevents the generation of the property for the corresponding association.

CsPropertyName

The name of the property

This modifies the name of the property corresponding to the association.

CsTypeExpr

Text specifying the attribute's type

Generation of types that cannot be represented in Objecteering (ex : int [] []).

CsBind

Binded types on the association

Specifies the types binded by a generic association.

 

 

Tagged values on a parameter

 

Name

Parameters

Role

CsShort

N/A

This declares the parameter as being short.

CsUnsignedShort

N/A

This declares the parameter as being unsigned short.

CsUnsignedInt

N/A

This declares the parameter as being unsigned int.

CsByte

N/A

This declares the parameter as being byte.

CsSignedByte

N/A

This declares the parameter as being signed byte.

CsLong

N/A

This declares the parameter as being long.

CsUnsignedLong

N/A

This declares the parameter as being unsigned long.

CsDouble

N/A

This declares the parameter as being double.

CsDecimal

N/A

This declares the parameter as being decimal.

CsParams

N/A

Supports the "params" parameter passing modes (variable number of arguments).

CsName

Name of the parameter

During the generation phase, the parameter of this tagged value takes precedence over the modeling name.

CsPointer

N/A

This declares the parameter as being a pointer (for example, "int *myInteger").

CsTypeExpr

Text specifying the parameter's type

Generation of the types that cannot be represented in Objecteering (ex : int [] []).

CsBind

Binded types on the parameter

Specifies the types binded by a generic parameter.

 

 

Tagged values on a realization

 

Name

Parameters

Role

CsFullName

N/A

Specify that the realization must be generated with the namespaced name of the interface.

 

 

Tagged values on a generalization

 

Name

Parameters

Role

CsFullName

N/A

Specify that the realization must be generated with the namespaced name of the interface.