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

📄 assoc.cpp

📁 hello everybody. good lucky to you
💻 CPP
字号:
/*------------------------------------------------------------------------*/
/*                                                                        */
/*  ASSOC.CPP                                                             */
/*                                                                        */
/*  Copyright Borland International 1991                                  */
/*  All Rights Reserved                                                   */
/*                                                                        */
/*------------------------------------------------------------------------*/

#if !defined( CHECKS_H )
#include <Checks.h>
#endif  // CHECKS_H

#if !defined( __ASSOC_H )
#include <Assoc.h>
#endif  // __ASSOC_H

#ifndef __IOSTREAM_H
#include <iostream.h>
#endif

Association::~Association()
{
    if( !ownsElements() )
        return;
    if( &aKey != ZERO )
        delete &aKey;
    if( &aValue != ZERO )
        delete &aValue;
}

void Association::printOn( ostream& outputStream ) const
{
    outputStream << " " << nameOf() << " { ";
    aKey.printOn( outputStream );
    outputStream << ", ";
    aValue.printOn( outputStream );
    outputStream << " }\n";
}

int Association::isEqual( const Object& toObject ) const
{
    return aKey == ( (Association&)toObject ).key();
}

⌨️ 快捷键说明

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