projects
/
shibboleth
/
cpp-opensaml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-opensaml.git]
/
saml
/
saml2
/
metadata
/
EndpointManager.h
diff --git
a/saml/saml2/metadata/EndpointManager.h
b/saml/saml2/metadata/EndpointManager.h
index
d8b0b8b
..
48eee56
100644
(file)
--- a/
saml/saml2/metadata/EndpointManager.h
+++ b/
saml/saml2/metadata/EndpointManager.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2001-200
6
Internet2
+ * Copyright 2001-200
9
Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-25,6
+25,9
@@
#include <saml/base.h>
#include <saml/base.h>
+#include <vector>
+#include <xercesc/util/XMLString.hpp>
+
namespace opensaml {
namespace saml2md {
namespace opensaml {
namespace saml2md {
@@
-37,7
+40,8
@@
namespace opensaml {
class EndpointManager
{
protected:
class EndpointManager
{
protected:
- typename const std::vector<_Tx*>& m_endpoints;
+ /** Reference to endpoint array. */
+ const typename std::vector<_Tx*>& m_endpoints;
public:
/**
public:
/**
@@
-45,7
+49,7
@@
namespace opensaml {
*
* @param endpoints array of endpoints to manage
*/
*
* @param endpoints array of endpoints to manage
*/
- EndpointManager(
typename const
std::vector<_Tx*>& endpoints) : m_endpoints(endpoints) {
+ EndpointManager(
const typename
std::vector<_Tx*>& endpoints) : m_endpoints(endpoints) {
}
/**
}
/**
@@
-55,7
+59,7
@@
namespace opensaml {
* @return a supporting endpoint, favoring the default, or NULL
*/
const _Tx* getByBinding(const XMLCh* binding) const {
* @return a supporting endpoint, favoring the default, or NULL
*/
const _Tx* getByBinding(const XMLCh* binding) const {
- for (std::vector<_Tx*>::const_iterator i = m_endpoints.begin(); i!=m_endpoints.end(); ++i) {
+ for (
typename
std::vector<_Tx*>::const_iterator i = m_endpoints.begin(); i!=m_endpoints.end(); ++i) {
if (xercesc::XMLString::equals(binding,(*i)->getBinding()))
return *i;
}
if (xercesc::XMLString::equals(binding,(*i)->getBinding()))
return *i;
}
@@
-71,7
+75,7
@@
namespace opensaml {
template <class _Tx>
class IndexedEndpointManager : public EndpointManager<_Tx>
{
template <class _Tx>
class IndexedEndpointManager : public EndpointManager<_Tx>
{
-
typename
const _Tx* m_default;
+ const _Tx* m_default;
public:
/**
public:
/**
@@
-79,7
+83,7
@@
namespace opensaml {
*
* @param endpoints array of endpoints to manage
*/
*
* @param endpoints array of endpoints to manage
*/
- IndexedEndpointManager(
typename const std::vector<_Tx*>& endpoints) : EndpointManager
(endpoints), m_default(NULL) {
+ IndexedEndpointManager(
const typename std::vector<_Tx*>& endpoints) : EndpointManager<_Tx>
(endpoints), m_default(NULL) {
}
/**
}
/**
@@
-90,11
+94,11
@@
namespace opensaml {
const _Tx* getDefault() const {
if (m_default)
return m_default;
const _Tx* getDefault() const {
if (m_default)
return m_default;
- for (
std::vector<_Tx*>::const_iterator i = m_endpoints.begin(); i!=
m_endpoints.end(); ++i) {
+ for (
typename std::vector<_Tx*>::const_iterator i = EndpointManager<_Tx>::m_endpoints.begin(); i!=EndpointManager<_Tx>::
m_endpoints.end(); ++i) {
if ((*i)->isDefault())
return m_default=*i;
}
if ((*i)->isDefault())
return m_default=*i;
}
- return (
m_endpoints.empty()) ? m_default=NULL : m_default=
m_endpoints.front();
+ return (
EndpointManager<_Tx>::m_endpoints.empty()) ? m_default=NULL : m_default=EndpointManager<_Tx>::
m_endpoints.front();
}
/**
}
/**
@@
-104,7
+108,7
@@
namespace opensaml {
* @return matching endpoint, or NULL
*/
const _Tx* getByIndex(unsigned short index) const {
* @return matching endpoint, or NULL
*/
const _Tx* getByIndex(unsigned short index) const {
- for (
std::vector<_Tx*>::const_iterator i = m_endpoints.begin(); i!=
m_endpoints.end(); ++i) {
+ for (
typename std::vector<_Tx*>::const_iterator i = EndpointManager<_Tx>::m_endpoints.begin(); i!=EndpointManager<_Tx>::
m_endpoints.end(); ++i) {
std::pair<bool,int> comp = (*i)->getIndex();
if (comp.first && index == comp.second)
return *i;
std::pair<bool,int> comp = (*i)->getIndex();
if (comp.first && index == comp.second)
return *i;
@@
-121,7
+125,7
@@
namespace opensaml {
const _Tx* getByBinding(const XMLCh* binding) const {
if (getDefault() && xercesc::XMLString::equals(binding,m_default->getBinding()))
return m_default;
const _Tx* getByBinding(const XMLCh* binding) const {
if (getDefault() && xercesc::XMLString::equals(binding,m_default->getBinding()))
return m_default;
- return EndpointManager::getByBinding(binding);
+ return EndpointManager
<_Tx>
::getByBinding(binding);
}
};
};
}
};
};