Rational Rose для разработчиков и ради разработчиков


Приложение №2


Пример кодогенерации.

Файл MyString.cpp

//## 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 body //## Source file: C:\Program Files\Rational\Rose\C++\source\MyString.cpp

//## begin module%395AF70D0321.additionalIncludes preserve=no //## end module%395AF70D0321.additionalIncludes

//## begin module%395AF70D0321.includes preserve=yes //## end module%395AF70D0321.includes

// MyString #include "MyString.h" //## begin module%395AF70D0321.additionalDeclarations preserve=yes //## end module%395AF70D0321.additionalDeclarations

// Class MyString

MyString::MyString() //## begin MyString::MyString%395AF70D0321_const.hasinit preserve=no //## end MyString::MyString%395AF70D0321_const.hasinit //## begin MyString::MyString%395AF70D0321_const.initialization preserve=yes //## end MyString::MyString%395AF70D0321_const.initialization { //## begin MyString::MyString%395AF70D0321_const.body preserve=yes //## end MyString::MyString%395AF70D0321_const.body }

MyString::~MyString() { //## begin MyString::~MyString%395AF70D0321_dest.body preserve=yes //## end MyString::~MyString%395AF70D0321_dest.body }

MyString & MyString::operator=(const MyString &right) { //## begin MyString::operator=%395AF70D0321_assign.body preserve=yes //## end MyString::operator=%395AF70D0321_assign.body }

int MyString::operator==(const MyString &right) const { //## begin MyString::operator==%395AF70D0321_eq.body preserve=yes //## end MyString::operator==%395AF70D0321_eq.body }

int MyString::operator!=(const MyString &right) const { //## begin MyString::operator!=%395AF70D0321_neq.body preserve=yes //## end MyString::operator!=%395AF70D0321_neq.body }

//## Other Operations (implementation)

Int MyString::GetStringSize (Char *massiv) { //## begin MyString::GetStringSize%395AF87900E9.body preserve=yes //## end MyString::GetStringSize%395AF87900E9.body }

Int MyString::PrintString (Char *Massiv) { //## begin MyString::PrintString%395AF88800B9.body preserve=yes //## end MyString::PrintString%395AF88800B9.body }

Int MyString::CmpString (Char *Str1, Char *Str2) { //## begin MyString::CmpString%395AF892013F.body preserve=yes //## end MyString::CmpString%395AF892013F.body }

Int MyString::CpyString (Char *Dest, Char *Source) { //## begin MyString::CpyString%395AF89C00D5.body preserve=yes //## end MyString::CpyString%395AF89C00D5.body }

// Additional Declarations //## begin MyString%395AF70D0321.declarations preserve=yes //## end MyString%395AF70D0321.declarations

//## begin module%395AF70D0321.epilog preserve=yes //## end module%395AF70D0321.epilog




- Начало -  - Назад -  - Вперед -