C++LinkDeQueue

2020-12-13 06:07

阅读:447

标签:nbsp   ack   sig   ++   get   back   typename   oid   kde   

#pragma once
#ifndef _LINKDEQUEUE_H_
#define _LINKDEQUEUE_H_

#include "linklist.h"

template>
class linkdequeue{
protected:
using uint = unsigned int;
_Container c;
public:

linkdequeue() :c(){ }
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_

 

C++LinkDeQueue

标签:nbsp   ack   sig   ++   get   back   typename   oid   kde   

原文地址:https://www.cnblogs.com/MasterYan576356467/p/11167367.html


评论


亲,登录后才可以留言!