C++LinkDeQueue
2020-12-13 06:07
标签:nbsp ack sig ++ get back typename oid kde #pragma once #include "linklist.h" template linkdequeue() :c(){ } }; C++LinkDeQueue 标签:nbsp ack sig ++ get back typename oid kde 原文地址:https://www.cnblogs.com/MasterYan576356467/p/11167367.html
#ifndef _LINKDEQUEUE_H_
#define _LINKDEQUEUE_H_
class linkdequeue{
protected:
using uint = unsigned int;
_Container c;
public:
explicit linkdequeue(const _Container &c) :c(c){ }
bool empty()const{ return c.empty(); }
uint size()const{ return c.size(); }
const _Container &getContainer() const{ return c; }
void push_back(const T &value){ c.push_back(value); }
void pop_back(){ c.pop_back(); }
void push_front(const T &value){ c.push_front(value); }
void pop_front(){ c.pop_front(); }
void clear(){ c.clear(); }
const T &front()const{ return c.front(); }
const T &back()const{ return c.back(); }
T &front(){ return c.front(); }
T &back(){ return c.back(); }
#endif // !_LINKQUEUE_H_