]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/IntParam.cc
2 * DEBUG: section 16 Cache Manager API
7 #include "base/TextException.h"
8 #include "ipc/TypedMsgHdr.h"
9 #include "mgr/IntParam.h"
11 Mgr::IntParam::IntParam():
12 QueryParam(QueryParam::ptInt
), array()
16 Mgr::IntParam::IntParam(const std::vector
<int>& anArray
):
17 QueryParam(QueryParam::ptInt
), array(anArray
)
22 Mgr::IntParam::pack(Ipc::TypedMsgHdr
& msg
) const
25 msg
.putInt(array
.size());
26 typedef std::vector
<int>::const_iterator Iterator
;
27 for (Iterator iter
= array
.begin(); iter
!= array
.end(); ++iter
)
32 Mgr::IntParam::unpackValue(const Ipc::TypedMsgHdr
& msg
)
35 int count
= msg
.getInt();
37 for ( ; count
> 0; --count
)
38 array
.push_back(msg
.getInt());
41 const std::vector
<int>&
42 Mgr::IntParam::value() const