Category& m_log;
string m_source;
// dest id, regex to apply, replacement string
- typedef tuple<string,boost::shared_ptr<RegularExpression>,const XMLCh*> regex_t;
+ typedef boost::tuple<string,boost::shared_ptr<RegularExpression>,const XMLCh*> regex_t;
vector<regex_t> m_regex;
};
try {
static XMLCh options[] = { chLatin_i, chNull };
boost::shared_ptr<RegularExpression> re(new RegularExpression(e->getAttributeNS(nullptr, match), (caseflag ? &chNull : options)));
- m_regex.push_back(make_tuple(destId, re, repl));
+ m_regex.push_back(boost::make_tuple(destId, re, repl));
}
catch (XMLException& ex) {
auto_ptr_char msg(ex.getMessage());
MatchFunctor* buildFunctor(
const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone
);
- tuple<string,const MatchFunctor*,const MatchFunctor*> buildAttributeRule(
+ boost::tuple<string,const MatchFunctor*,const MatchFunctor*> buildAttributeRule(
const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
);
Category& m_log;
DOMDocument* m_document;
vector<Policy> m_policies;
- map< string,tuple<string,const MatchFunctor*,const MatchFunctor*> > m_attrRules;
+ map< string,boost::tuple<string,const MatchFunctor*,const MatchFunctor*> > m_attrRules;
multimap<string,MatchFunctor*> m_policyReqRules;
multimap<string,MatchFunctor*> m_permitValRules;
multimap<string,MatchFunctor*> m_denyValRules;
e = XMLHelper::getNextSiblingElement(e);
while (e) {
if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
- tuple<string,const MatchFunctor*,const MatchFunctor*> rule = buildAttributeRule(e, permFunctors, denyFunctors, false);
+ boost::tuple<string,const MatchFunctor*,const MatchFunctor*> rule = buildAttributeRule(e, permFunctors, denyFunctors, false);
if (rule.get<1>() || rule.get<2>())
m_policies.back().m_rules.insert(Policy::rules_t::value_type(rule.get<0>(), make_pair(rule.get<1>(), rule.get<2>())));
}
else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeRuleReference)) {
string ref(XMLHelper::getAttrString(e, nullptr, _ref));
if (!ref.empty()) {
- map< string,tuple<string,const MatchFunctor*,const MatchFunctor*> >::const_iterator ar = m_attrRules.find(ref);
+ map< string,boost::tuple<string,const MatchFunctor*,const MatchFunctor*> >::const_iterator ar = m_attrRules.find(ref);
if (ar != m_attrRules.end()) {
m_policies.back().m_rules.insert(
Policy::rules_t::value_type(ar->second.get<0>(), make_pair(ar->second.get<1>(), ar->second.get<2>()))
return nullptr;
}
-tuple<string,const MatchFunctor*,const MatchFunctor*> XMLFilterImpl::buildAttributeRule(
+boost::tuple<string,const MatchFunctor*,const MatchFunctor*> XMLFilterImpl::buildAttributeRule(
const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
)
{
if (standalone && id.empty()) {
m_log.warn("skipping stand-alone AttributeRule with no id");
- return tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
+ return boost::tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
}
else if (!id.empty() && m_attrRules.count(id)) {
if (standalone) {
m_log.warn("skipping duplicate stand-alone AttributeRule with id (%s)", id.c_str());
- return tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
+ return boost::tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
}
else
id.clear();
if (perm || deny) {
if (!id.empty()) {
- m_attrRules[id] = make_tuple(attrID, perm, deny);
+ m_attrRules[id] = boost::make_tuple(attrID, perm, deny);
return m_attrRules[id];
}
else {
- return make_tuple(attrID, perm, deny);
+ return boost::make_tuple(attrID, perm, deny);
}
}
m_log.warn("skipping AttributeRule (%s), permit and denial rule(s) invalid or missing", id.c_str());
else
m_log.warn("skipping AttributeRule, permit and denial rule(s) invalid or missing");
- return tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
+ return boost::tuple<string,const MatchFunctor*,const MatchFunctor*>(string(),nullptr,nullptr);
}
void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Attribute*>& attributes) const
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (!t.empty()) {
try {
- Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver."CHAINING_ATTRIBUTE_RESOLVER).info(
+ Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver." CHAINING_ATTRIBUTE_RESOLVER).info(
"building AttributeResolver of type (%s)...", t.c_str()
);
auto_ptr<AttributeResolver> np(conf.AttributeResolverManager.newPlugin(t.c_str(), e));
np.release();
}
catch (exception& ex) {
- Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver."CHAINING_ATTRIBUTE_RESOLVER).error(
+ Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver." CHAINING_ATTRIBUTE_RESOLVER).error(
"caught exception processing embedded AttributeResolver element: %s", ex.what()
);
}
context->getResolvedAssertions().clear();
}
catch (exception& ex) {
- Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver."CHAINING_ATTRIBUTE_RESOLVER).error(
+ Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver." CHAINING_ATTRIBUTE_RESOLVER).error(
"caught exception applying AttributeResolver in chain: %s", ex.what()
);
}
m_orgName,
m_orgDisplayName,
m_orgURL;
- typedef tuple< string,xstring,boost::shared_ptr<AttributeDecoder> > contact_tuple_t;
- typedef tuple< string,int,int,boost::shared_ptr<AttributeDecoder> > logo_tuple_t;
+ typedef boost::tuple< string,xstring,boost::shared_ptr<AttributeDecoder> > contact_tuple_t;
+ typedef boost::tuple< string,int,int,boost::shared_ptr<AttributeDecoder> > logo_tuple_t;
vector<contact_tuple_t> m_contacts; // tuple is attributeID, contact type, decoder
vector<logo_tuple_t> m_logos; // tuple is attributeID, height, width, decoder
typedef map< pair<xstring,xstring>,pair< boost::shared_ptr<AttributeDecoder>,vector<string> > > attrmap_t;
attrmap_t m_attrMap;
vector<string> m_attributeIds;
- vector< tuple<xstring,xstring,bool> > m_requestedAttrs;
+ vector< boost::tuple<xstring,xstring,bool> > m_requestedAttrs;
// settings for embedded assertions in metadata
string m_policyId;
bool requested = XMLHelper::getAttrBool(child, false, isRequested);
bool required = XMLHelper::getAttrBool(child, false, RequestedAttribute::ISREQUIRED_ATTRIB_NAME);
if (required || requested)
- m_requestedAttrs.push_back(tuple<xstring,xstring,bool>(name,format,required));
+ m_requestedAttrs.push_back(boost::tuple<xstring,xstring,bool>(name,format,required));
name = child->getAttributeNS(nullptr, _aliases);
if (name && *name) {
static const XMLCh english[] = UNICODE_LITERAL_2(e,n);
sn->setLang(english);
- for (vector< tuple<xstring,xstring,bool> >::const_iterator i = m_requestedAttrs.begin(); i != m_requestedAttrs.end(); ++i) {
+ for (vector< boost::tuple<xstring,xstring,bool> >::const_iterator i = m_requestedAttrs.begin(); i != m_requestedAttrs.end(); ++i) {
RequestedAttribute* req = RequestedAttributeBuilder::buildRequestedAttribute();
svc->getRequestedAttributes().push_back(req);
req->setName(i->get<0>().c_str());
bool m_unicodeAware;
map< string,boost::shared_ptr<Override> > m_map;
vector< pair< boost::shared_ptr<RegularExpression>,boost::shared_ptr<Override> > > m_regexps;
- vector< tuple< string,boost::shared_ptr<RegularExpression>,boost::shared_ptr<Override> > > m_queries;
+ vector< boost::tuple< string,boost::shared_ptr<RegularExpression>,boost::shared_ptr<Override> > > m_queries;
private:
scoped_ptr<AccessControl> m_acl;
try {
boost::shared_ptr<Override> o(new Override(m_unicodeAware, path, log, this));
boost::shared_ptr<RegularExpression> re((v && *v) ? new RegularExpression(v) : nullptr);
- m_queries.push_back(make_tuple(string(ntemp.get()), re, o));
+ m_queries.push_back(boost::make_tuple(string(ntemp.get()), re, o));
}
catch (XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
CGIParser cgi(request, true);
do {
descended = false;
- for (vector< tuple< string,boost::shared_ptr<RegularExpression>,boost::shared_ptr<Override> > >::const_iterator q = o->m_queries.begin(); !descended && q != o->m_queries.end(); ++q) {
+ for (vector< boost::tuple< string,boost::shared_ptr<RegularExpression>,boost::shared_ptr<Override> > >::const_iterator q = o->m_queries.begin(); !descended && q != o->m_queries.end(); ++q) {
pair<CGIParser::walker,CGIParser::walker> vals = cgi.getParameters(q->get<0>().c_str());
if (vals.first != vals.second) {
if (q->get<1>()) {
#ifndef SHIBSP_LITE
scoped_ptr<TransactionLog> m_tranLog;
scoped_ptr<SecurityPolicyProvider> m_policy;
- vector< tuple<string,string,string> > m_transportOptions;
+ vector< boost::tuple<string,string,string> > m_transportOptions;
#endif
scoped_ptr<RequestMapper> m_requestMapper;
map< string,boost::shared_ptr<Application> > m_appmap;
bool setTransportOptions(SOAPTransport& transport) const {
bool ret = true;
- for (vector< tuple<string,string,string> >::const_iterator opt = m_impl->m_transportOptions.begin();
+ for (vector< boost::tuple<string,string,string> >::const_iterator opt = m_impl->m_transportOptions.begin();
opt != m_impl->m_transportOptions.end(); ++opt) {
if (!transport.setProviderOption(opt->get<0>().c_str(), opt->get<1>().c_str(), opt->get<2>().c_str())) {
m_log.error("failed to set SOAPTransport option (%s)", opt->get<1>().c_str());
string option(XMLHelper::getAttrString(child, nullptr, _option));
auto_ptr_char value(child->getFirstChild()->getNodeValue());
if (!provider.empty() && !option.empty() && value.get() && *value.get()) {
- m_transportOptions.push_back(make_tuple(provider, option, string(value.get())));
+ m_transportOptions.push_back(boost::make_tuple(provider, option, string(value.get())));
}
}
child = XMLHelper::getPreviousSiblingElement(child, TransportOption);