]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/StringParam.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / mgr / StringParam.cc
CommitLineData
b8151fa1 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
b8151fa1 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
b8151fa1
CT
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
f7f3304a 11#include "squid.h"
b8151fa1
CT
12#include "ipc/TypedMsgHdr.h"
13#include "mgr/StringParam.h"
14
b8151fa1 15Mgr::StringParam::StringParam():
f53969cc 16 QueryParam(QueryParam::ptString), str()
b8151fa1
CT
17{
18}
19
20Mgr::StringParam::StringParam(const String& aString):
f53969cc 21 QueryParam(QueryParam::ptString), str(aString)
b8151fa1
CT
22{
23}
24
25void
26Mgr::StringParam::pack(Ipc::TypedMsgHdr& msg) const
27{
28 msg.putPod(type);
29 msg.putString(str);
30}
31
32void
33Mgr::StringParam::unpackValue(const Ipc::TypedMsgHdr& msg)
34{
35 msg.getString(str);
36}
37
38const String&
39Mgr::StringParam::value() const
40{
41 return str;
42}
f53969cc 43