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

📄 dict.cpp

📁 uc/os 很好的学习代码
💻 CPP
字号:
/*------------------------------------------------------------------------*/
/*                                                                        */
/*  DICT.CPP                                                              */
/*                                                                        */
/*  Copyright Borland International 1991                                  */
/*  All Rights Reserved                                                   */
/*                                                                        */
/*------------------------------------------------------------------------*/

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

#if !defined( __DICT_H )
#include <Dict.h>
#endif  // __DICT_H

#if !defined( __IOSTREAM_H )
#include <iostream.h>
#endif  // __IOSTREAM_H

#if !defined( __CLSTYPES_H )
#include <ClsTypes.h>
#endif  // __CLSTYPES_H

void Dictionary::add( Object& objectToAdd )
{
    if( !objectToAdd.isAssociation() )
        ClassLib_error( __ENOTASSOC );
    else
        Set::add( objectToAdd );
}

Association& Dictionary::lookup( const Object& toLookUp ) const
{
    Association toFind( (Object&)toLookUp, NOOBJECT );
    toFind.ownsElements(0);

    Association& found = (Association&)findMember( toFind );
    return found;
}

⌨️ 快捷键说明

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