Read the documentation to learn
Пример кодогенерации.
Файл MyString.h
//## begin module%1.3%.codegen_version preserve=yes // Read the documentation to learn more about C++ code generator // versioning. //## end module%1.3%.codegen_version
//## begin module%395AF70D0321.cm preserve=no // %X% %Q% %Z% %W% //## end module%395AF70D0321.cm
//## begin module%395AF70D0321.cp preserve=no //## end module%395AF70D0321.cp
//## Module: MyString%395AF70D0321; Pseudo Package specification //## Source file: C:\Program Files\Rational\Rose\C++\source\MyString.h #ifndef MyString_h #define MyString_h 1
//## begin module%395AF70D0321.additionalIncludes preserve=no //## end module%395AF70D0321.additionalIncludes
//## begin module%395AF70D0321.includes preserve=yes //## end module%395AF70D0321.includes
//## begin module%395AF70D0321.additionalDeclarations preserve=yes //## end module%395AF70D0321.additionalDeclarations
//## begin MyString%395AF70D0321.preface preserve=yes //## end MyString%395AF70D0321.preface
//## Class: MyString%395AF70D0321 // Данный класс позволяет проводить различные операции над // массивами символов. //## Category: <Top Level> //## Persistence: Transient //## Cardinality/Multiplicity: n
class MyString { //## begin MyString%395AF70D0321.initialDeclarations preserve=yes //## end MyString%395AF70D0321.initialDeclarations
public: //## Constructors (generated) MyString();
//## Destructor (generated) ~MyString();
//## Assignment Operation (generated) MyString & operator=(const MyString &right);
//## Equality Operations (generated) int operator==(const MyString &right) const; int operator!=(const MyString &right) const;
//## Other Operations (specified) //## Operation: GetStringSize%395AF87900E9 // Подсчитывает количество символов в переданном массиве Int GetStringSize (Char *massiv // Указатель на массив );
//## Operation: PrintString%395AF88800B9 // Печатает на экране переданный массив Int PrintString (Char *Massiv // Указатель на массив );
//## Operation: CmpString%395AF892013F // Сравнивает два массива.
Int CmpString (Char *Str1, // Указатель на первый массив Char *Str2 // Указатель на второй массив );
//## Operation: CpyString%395AF89C00D5 // Копирует один массив в другой Int CpyString (Char *Dest, // Назначение Char *Source // Источник );
//## Get and Set Operations for Class Attributes (generated)
//## Attribute: Stat%395AF8BB0289 // Общедоступная переменная числа обращений к PrintString const Int get_Stat () const; void set_Stat (Int value);
//## Attribute: Count%395AF8C20148 // Определяет статус определенного объекта const Int get_Count () const; void set_Count (Int value);
// Additional Public Declarations //## begin MyString%395AF70D0321.public preserve=yes //## end MyString%395AF70D0321.public
protected: // Additional Protected Declarations //## begin MyString%395AF70D0321.protected preserve=yes //## end MyString%395AF70D0321.protected
private: //## Get and Set Operations for Class Attributes (generated) //## Attribute: TmpString%395AF8B201E5 // Временный указатель на строковый массив. Можно // использовать в качестве буфера const Char * get_TmpString () const; void set_TmpString (Char * value);
// Additional Private Declarations //## begin MyString%395AF70D0321.private preserve=yes //## end MyString%395AF70D0321.private
private: //## implementation // Data Members for Class Attributes
//## begin MyString::TmpString%395AF8B201E5.attr preserve=no private: Char * {U} Char *TmpString; //## end MyString::TmpString%395AF8B201E5.attr
//## begin MyString::Stat%395AF8BB0289.attr preserve=no public: Int {U} Int Stat; //## end MyString::Stat%395AF8BB0289.attr
//## begin MyString::Count%395AF8C20148.attr preserve=no public: Int {U} Int Count; //## end MyString::Count%395AF8C20148.attr
// Additional Implementation Declarations //## begin MyString%395AF70D0321.implementation preserve=yes //## end MyString%395AF70D0321.implementation }; //## begin MyString%395AF70D0321.postscript preserve=yes //## end MyString%395AF70D0321.postscript
// Class MyString
//## Get and Set Operations for Class Attributes (inline)
inline const Char * MyString::get_TmpString () const { //## begin MyString::get_TmpString%395AF8B201E5.get preserve=no return TmpString; //## end MyString::get_TmpString%395AF8B201E5.get }
inline void MyString::set_TmpString (Char * value) { //## begin MyString::set_TmpString%395AF8B201E5.set preserve=no TmpString = value; //## end MyString::set_TmpString%395AF8B201E5.set }
inline const Int MyString::get_Stat () const { //## begin MyString::get_Stat%395AF8BB0289.get preserve=no return Stat; //## end MyString::get_Stat%395AF8BB0289.get }
inline void MyString::set_Stat (Int value) { //## begin MyString::set_Stat%395AF8BB0289.set preserve=no Stat = value; //## end MyString::set_Stat%395AF8BB0289.set }
inline const Int MyString::get_Count () const { //## begin MyString::get_Count%395AF8C20148.get preserve=no return Count; //## end MyString::get_Count%395AF8C20148.get }
inline void MyString::set_Count (Int value) { //## begin MyString::set_Count%395AF8C20148.set preserve=no Count = value; //## end MyString::set_Count%395AF8C20148.set }
//## begin module%395AF70D0321.epilog preserve=yes //## end module%395AF70D0321.epilog
#endif