Line | |
---|
1 | // |
---|
2 | // C++ Implementation: ClientInformation |
---|
3 | // |
---|
4 | // Description: |
---|
5 | // |
---|
6 | // |
---|
7 | // Author: <>, (C) 2007 |
---|
8 | // |
---|
9 | // Copyright: See COPYING file that comes with this distribution |
---|
10 | // |
---|
11 | // |
---|
12 | #include "ClientInformation.h" |
---|
13 | |
---|
14 | namespace network { |
---|
15 | |
---|
16 | ClientInformation::ClientInformation() |
---|
17 | { |
---|
18 | preve=0; |
---|
19 | nexte=0; |
---|
20 | } |
---|
21 | // |
---|
22 | |
---|
23 | // ClientInformation::ClientInformation(ClientInformation *prev){ |
---|
24 | // if(prev->next()!=0){ |
---|
25 | // this->nexte=prev->next(); |
---|
26 | // this->nexte->setPrev(this); |
---|
27 | // } |
---|
28 | // else |
---|
29 | // this->nexte = 0; |
---|
30 | // prev->setNext(this); |
---|
31 | // this->preve = pref; |
---|
32 | // } |
---|
33 | // |
---|
34 | // ClientInformation::ClientInformation(ClientInformation *prev, ClientInformation *next){ |
---|
35 | // this->nexte = next; |
---|
36 | // this->preve = prev; |
---|
37 | // this->preve->setNext(this); |
---|
38 | // this->nexte->setPrev(this); |
---|
39 | // } |
---|
40 | |
---|
41 | ClientInformation::~ClientInformation() |
---|
42 | { |
---|
43 | if(preve!=0) |
---|
44 | preve->setNext(this->nexte); |
---|
45 | if(nexte!=0) |
---|
46 | nexte->setPrev(this->preve); |
---|
47 | } |
---|
48 | |
---|
49 | ClientInformation *ClientInformation::next(){ |
---|
50 | return this->nexte; |
---|
51 | } |
---|
52 | ClientInformation *ClientInformation::prev(){ |
---|
53 | return this->preve; |
---|
54 | } |
---|
55 | |
---|
56 | void ClientInformation::setPrev(ClientInformation *prev){ |
---|
57 | this->preve = prev; |
---|
58 | } |
---|
59 | |
---|
60 | void ClientInformation::setNext(ClientInformation *next){ |
---|
61 | this->nexte = next; |
---|
62 | } |
---|
63 | |
---|
64 | void ClientInformation::insertAfter(ClientInformation *ins){ |
---|
65 | this->nexte->setPrev(ins); |
---|
66 | ins->setNext(this->nexte); |
---|
67 | ins->setPrev(this); |
---|
68 | this->nexte = ins; |
---|
69 | } |
---|
70 | |
---|
71 | void ClientInformation::insertBefore(ClientInformation *ins){ |
---|
72 | this->prev()->setNext(ins); |
---|
73 | ins->setPrev(this->preve); |
---|
74 | this->preve=ins; |
---|
75 | ins->setNext(this); |
---|
76 | } |
---|
77 | |
---|
78 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.