repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lilypond-0.0.27
[lilypond.git]
/
flower
/
list.inl
blob
df0687b7c8b5b28e71cfd47ad96fbbd64b7caf8e
1
// -*-c++-*-
2
3
#ifndef LIST_INL
4
#define LIST_INL
5
6
template<class T>
7
inline
8
List<T>::List()
9
{
10
set_empty();
11
}
12
13
template<class T>
14
inline void
15
List<T>::set_empty()
16
{
17
top_ = bottom_ = 0;
18
size_ = 0;
19
}
20
21
template<class T>
22
inline void
23
List<T>::remove( Cursor<T> me )
24
{
25
if ( me.ok() ){
26
Link<T> *lp = me.pointer();
27
lp->remove(*this);
28
delete lp;
29
size_--;
30
}
31
}
32
33
template<class T>
34
inline int
35
List<T>::size() const
36
{
37
return size_;
38
}
39
40
template<class T>
41
inline Cursor<T>
42
List<T>::top()const
43
{
44
return Cursor<T>( *this, top_ );
45
}
46
47
48
template<class T>
49
inline Cursor<T>
50
List<T>::bottom()const
51
{
52
return Cursor<T>( *this, bottom_ );
53
}
54
55
56
#endif