c++设计模式(精简版)
typedef typename _Container::value_type value_type;
typedef typename _Container::size_type size_type;
stack()
: c()
{ // construct with empty container
}
explicit stack(const _Container& _Cont)
: c(_Cont)
{ // construct by copying specified container
}
bool empty() const
{ // test if stack is empty
return (c.empty());
}
size_type size() const
{ // test length of stack
return (c.size());
}
value_type& top()
{ // return last element of mutable stack
return (c.back());
}
const value_type& top() const
{ // return last element of nonmutable stack
return (c.back());
}
void push(const value_type& _Val)
{ // insert element at end
c.push_back(_Val);
}
void pop()
{ // erase last element
c.pop_back();
}
bool _Eq(const stack<_Ty, _Container>& _Right) const
{ // test for stack equality
C++设计模式一、功能 将一个类的接口转换成客户希望的另外一个接口,解决两个已有接口之间不匹配的问 题。 Adapter 模式使得原本由于接口不兼容而不能一起工作的...
c++设计模式_精简版_ 隐藏>> Adapter (1)class adapter (2)object adapter STL adapter Adapter function adapter iterator adpter (1)class adapter (2)object...
93页 1财富值 23种设计模式(C++) 171页 免费 c++设计模式(精简版) 22页 免费 C++设计模式 105页 免费 23种设计模式(C++) 171页 5财富值...
设计模式之观察者模式 暂无评价 3页 1下载券喜欢此文档的还喜欢 c++设计模式(精简版) 22页 免费 C++实现观察者模式 5页 免费 C++设计模式 105页 1下载券 ...
c++设计模式(精简版) 22页 免费 深入浅出设计模式(中文版) 93页 1财富值 C++设计模式 105页 免费 23种设计模式(C++) 171页 5财富值 常见设计模式的解析和...
C++设计模式 105页 1下载券 c++设计模式(精简版) 22页 免费 深入浅出设计...面向对象程序设计(C++) 面向对象程序设计(C++)实验指导一、实验环境本实验基于...
C++设计模式_信息与通信_工程科技_专业资料。设计模式精解-GoF 23 种设计模式...因此 GoF 的这本圣经在很多地方用语都比较精简和抽象,读过的可能都有一 种确实...
设计模式C++_计算机软件及应用_IT/计算机_专业资料。工厂 适配器 等... c++设计模式(精简版) 22页 免费 23种设计模式(C++) 171页 2下载券 常见...
设计模式(Design Pattern) 一个设计模式提供一种提炼子系统或软件系统中的组件的... c++设计模式(精简版) 22页 免费 深入浅出设计模式(中文版... 93页 1下载...
热门文档