⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cardlist.cpp

📁 含有uml的多个实例及实例的java源码。
💻 CPP
字号:
// {{{RME classifier 'Logical View::CardDefinitions::CardList'#if defined( PRAGMA ) && ! defined( PRAGMA_IMPLEMENTED )#pragma implementation "CardList.h"#endif#include <RTSystem/CardGameComponent.h>#include <CardList.h>#include <Card.h>// {{{RME tool 'OT::Cpp' property 'ImplementationPreface'// {{{USR// }}}USR// }}}RMEstatic void rtg_CardList_init( const RTObject_class * type, CardList * target ){	(void)new( target ) CardList;}static void rtg_CardList_copy( const RTObject_class * type, CardList * target, const CardList * source ){	(void)new( target ) CardList( *source );}static void rtg_CardList_destroy( const RTObject_class * type, CardList * target ){	target->~CardList();}// {{{RME associationEnd '_contents' tool 'OT::CppTargetRTS' property 'NumElementsFunctionBody'static int rtg_nefb_CardList__contents( const RTTypeModifier * modifier, const CardList * source ){	// {{{USR	return(source->size());	// }}}USR}// }}}RMEconst RTTypeModifier rtg_tm_CardList__contents ={	(RTNumberFunction)rtg_nefb_CardList__contents  , 1  , 1};const RTObject_class RTType_CardList ={	(const RTObject_class *)0  , (RTSuperAccessFunction)0  , "CardList"  , (RTVersionId)0  , (RTFieldOffset)sizeof( CardList )  , (RTInitFunction)rtg_CardList_init  , (RTCopyFunction)rtg_CardList_copy#if OBJECT_DECODE  , RTstruct_decode#endif#if OBJECT_ENCODE  , RTstruct_encode#endif  , (RTDestroyFunction)rtg_CardList_destroy  , 2  , CardList::rtg_CardList_fields};// {{{RME operation 'CardList(int)'CardList::CardList( int initial_size )	// {{{RME tool 'OT::Cpp' property 'ConstructorInitializer'	// {{{USR	: _contents((Card *)0)	// }}}USR	// }}}RME{	// {{{USR	if( initial_size < 0 )		_size = 0;	else	{		_size = initial_size;		_contents = new Card [ (unsigned)_size ];	}	// }}}USR}// }}}RME// {{{RME operation 'CardList(const CardList &)'CardList::CardList( const CardList & other )	// {{{RME tool 'OT::Cpp' property 'ConstructorInitializer'	// {{{USR	: _contents((Card *)0)	// }}}USR	// }}}RME{	// {{{USR	if( other._size < 0 )		_size = 0;	else	{		_size = other._size;		_contents = new Card [ (unsigned)_size ];	  		for( int i = 0; i < _size; i++ )			_contents[i] = other._contents[i];	}	// }}}USR}// }}}RME// {{{RME operation '~CardList()'CardList::~CardList( void ){	// {{{USR	delete [] _contents;	// }}}USR}// }}}RME// {{{RME operation 'size()'int CardList::size( void ) const{	// {{{USR	return _size;	// }}}USR}// }}}RME// {{{RME operation 'operator[](const int)'Card & CardList::operator[]( const int index ){	// {{{USR	return _contents[index];	// }}}USR}// }}}RME// {{{RME operation 'operator=(const CardList &)'CardList & CardList::operator=( const CardList & rhs ){	// {{{USR	if( this != &rhs )	{		delete [] _contents;		_size     = rhs._size;		_contents = new Card [ (unsigned)_size ];		for( int i = 0; i < _size; ++i )			_contents[i] = rhs._contents[i];	}	return *this;	// }}}USR}// }}}RMEconst RTFieldDescriptor CardList::rtg_CardList_fields[] ={	// {{{RME classAttribute '_size'	{		"_size"	  , RTOffsetOf( CardList, _size )		// {{{RME tool 'OT::CppTargetRTS' property 'TypeDescriptor'	  , &RTType_int		// }}}RME		// {{{RME tool 'OT::CppTargetRTS' property 'GenerateTypeModifier'	  , (const RTTypeModifier *)0		// }}}RME	}	// }}}RME	// {{{RME associationEnd '_contents'  , {		"_contents"	  , RTOffsetOf( CardList, _contents )		// {{{RME tool 'OT::CppTargetRTS' property 'TypeDescriptor'	  , &RTType_Card		// }}}RME		// {{{RME tool 'OT::CppTargetRTS' property 'GenerateTypeModifier'	  , &rtg_tm_CardList__contents		// }}}RME	}	// }}}RME};#if OBJECT_DECODERTTypeInstaller rtg_CardList_installer( RTType_CardList );#endif// {{{RME tool 'OT::Cpp' property 'ImplementationEnding'// {{{USR// }}}USR// }}}RME// }}}RME

⌨️ 快捷键说明

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