Rudiments
treecollectioninlines.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information
3
4template <class valuetype>
5inline
8
9template <class valuetype>
10inline
14
15template <class valuetype>
16inline
18 return "tree";
19}
20
21template <class valuetype>
22inline
23void treecollection<valuetype>::insert(valuetype *values, uint64_t count) {
24 for (uint64_t i=0; i<count; i++) {
25 insert(values[i]);
26 }
27}
28
29template <class valuetype>
30inline
32 return write(&stdoutput);
33}
34
35template <class valuetype>
36inline
39 return writeNodeXml(out,getTop(),"t",&indentlevel,true,true);
40}
41
42template< class valuetype >
43inline
45 return writeJson(&stdoutput,true);
46}
47
48template< class valuetype >
49inline
51 return writeJson(&stdoutput,indent);
52}
53
54template< class valuetype >
55inline
57 return writeJson(out,true);
58}
59
60template< class valuetype >
61inline
62ssize_t treecollection<valuetype>::writeJson(output *out, bool indent) {
64 return writeNodeJson(out,getTop(),&indentlevel,indent);
65}
66
67template< class valuetype >
68inline
70 return writeXml(&stdoutput,true);
71}
72
73template< class valuetype >
74inline
76 return writeXml(&stdoutput,indent);
77}
78
79template< class valuetype >
80inline
82 return writeXml(out,true);
83}
84
85template< class valuetype >
86inline
87ssize_t treecollection<valuetype>::writeXml(output *out, bool indent) {
89 return writeNodeXml(out,getTop(),"t",&indentlevel,false,indent);
90}
Definition avltree.h:11
Definition nodecollection.h:31
Definition output.h:11
treecollection()
Definition treecollectioninlines.h:6
virtual ssize_t writeXml()
Definition treecollectioninlines.h:69
virtual void insert(valuetype value)=0
virtual ssize_t writeJson()
Definition treecollectioninlines.h:44
virtual ssize_t write()
Definition treecollectioninlines.h:31
virtual const char * getType()
Definition treecollectioninlines.h:17