operation.cpp

来自「uml编辑器很牛」· C++ 代码 · 共 93 行

CPP
93
字号
/* ==========================================================================
	Class :			COperation

	Author :		Johan Rosengren, Abstrakt Mekanik AB

	Date :			06/02/04

	Purpose :		"COperation", derived from "CObject", represents a single 
					operation for a "CUMLEntityClass" object. 

	Description :	The operations are stored in a "COperationContainer" 
					member of "CUMLEntityClass".

	Usage :			Create from "CUMLEntityClass" and add to the 
					"COperationContainer".

   ========================================================================
	Changes :		12/7 2004	Added support for template C++-generation.
   ========================================================================*/

#include "stdafx.h"
#include "Operation.h"
#include "DiagramEditor/Tokenizer.h"
#include "StringHelpers.h"
#include "UMLEntity.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

// Construction/destruction
COperation::COperation()
/* ============================================================
	Function :		COperation::COperation
	Description :	Constructor
	Access :		Public

	Return :		void
	Parameters :	none

	Usage :			Always add to a container.

   ============================================================*/
{

	maintype = 0;
	access = 0;

	setter = FALSE;
	getter = FALSE;

}

COperation::~COperation()
/* ============================================================
	Function :		COperation::~COperation
	Description :	Destructor
	Access :		Public
					
	Return :		void
	Parameters :	none

	Usage :			Will be destroyed by the owning container

   ============================================================*/
{
}

// Implementation
CString COperation::ToString( BOOL nomarkers, BOOL nooperationattributenames )
/* ============================================================
	Function :		COperation::ToString
	Description :	Gets a display string representation in 
					UML-format of the operation.
	Access :		Public

	Return :		CString	-	display string
	Parameters :	COperation* obj					-	Operation to display
					BOOL nomarkers					-	"TRUE" if access markers
														should be supressed.
					BOOL nooperationattributenames	-	"TRUE" if parameter name
														should be supressed.
	
	Usage :			Call to get a display string for the operation.

   ============================================================*/
{

	CString output;
	if( stereotype.GetLength() )
		output = _T( "

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?