/*
- * $Id$
- *
- * DEBUG: section 16 Cache Manager API
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
-#include "config.h"
+/* DEBUG: section 16 Cache Manager API */
+
+#include "squid.h"
#include "base/TextException.h"
#include "ipc/TypedMsgHdr.h"
#include "mgr/IntParam.h"
-#include "mgr/StringParam.h"
#include "mgr/QueryParams.h"
-#include <regex.h>
-
+#include "mgr/StringParam.h"
Mgr::QueryParam::Pointer
-Mgr::QueryParams::get(const String& name)
+Mgr::QueryParams::get(const String& name) const
{
Must(name.size() != 0);
- Params::iterator pos = find(name);
+ Params::const_iterator pos = find(name);
return (pos == params.end() ? NULL : pos->second);
}
}
}
-Mgr::QueryParams::Params::iterator
-Mgr::QueryParams::find(const String& name)
+Mgr::QueryParams::Params::const_iterator
+Mgr::QueryParams::find(const String& name) const
{
Must(name.size() != 0);
- Params::iterator iter = params.begin();
+ Params::const_iterator iter = params.begin();
for ( ; iter != params.end(); ++iter) {
if (name.caseCmp(iter->first) == 0)
break;
Mgr::QueryParam::Pointer
Mgr::QueryParams::CreateParam(QueryParam::Type aType)
{
- switch(aType) {
+ switch (aType) {
case QueryParam::ptInt:
return new IntParam();
}
return NULL;
}
+