rb_tree_functors.h
来自「ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识」· C头文件 代码 · 共 38 行
H
38 行
/* -*- C++ -*- */// $Id: RB_Tree_Functors.h 69745 2005-12-02 08:45:34Z isisbuilds $#ifndef __RB_TREE_FUNCTORS_H_#define __RB_TREE_FUNCTORS_H_#include "ace/Functor.h"// Listing 1 code/ch05// Same key type.class KeyType{public: KeyType () : val_(0) {} KeyType (int i) : val_ (i) {} KeyType (const KeyType& kt) { this->val_ = kt.val_; } operator int() const { return val_; };private: int val_;};ACE_BEGIN_VERSIONED_NAMESPACE_DECLtemplate<>class ACE_Less_Than<KeyType>{public: int operator() (const KeyType k1, const KeyType k2) { return k1 < k2; }};ACE_END_VERSIONED_NAMESPACE_DECL// Listing 1#endif /* __RB_TREE_FUNCTORS_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?