44 std::vector<XrdSecAttr*>::iterator it;
48 for (it = entXtra->
attrVec.begin(); it != entXtra->
attrVec.end(); it++)
49 if ((*it)->Signature == attr.Signature)
return false;
53 entXtra->
attrVec.push_back(&attr);
60 const std::string &val,
bool replace)
63 std::map<std::string, std::string>::iterator it;
68 it = entXtra->
attrMap.find(key);
69 if (it != entXtra->
attrMap.end())
70 {
if (!replace)
return false;
76 if (found) it->second = val;
77 else entXtra->
attrMap.insert(std::make_pair(key, val));
88 std::vector<XrdSecAttr*>::iterator it;
92 for (it = entXtra->
attrVec.begin(); it != entXtra->
attrVec.end(); it++)
93 if ((*it)->Signature == sigkey)
return *it;
105 std::map<std::string, std::string>::iterator it;
109 it = entXtra->
attrMap.find(key);
110 if (it != entXtra->
attrMap.end())
127 std::map<std::string, std::string>::iterator itM;
128 std::vector<std::string> keyVec;
130 for (itM = entXtra->
attrMap.begin();
131 itM != entXtra->
attrMap.end(); itM++) keyVec.push_back(itM->first);
143 std::map<std::string, std::string>::iterator itM;
144 std::vector<const char *> attrDel;
145 std::vector<const char *>::iterator itV;
148 for (itM = entXtra->
attrMap.begin();
149 itM != entXtra->
attrMap.end(); itM++)
150 {rc = attrCB.
Attr(itM->first.c_str(), itM->second.c_str());
153 attrDel.push_back(itM->first.c_str());
158 for (itV = attrDel.begin(); itV != attrDel.end(); itV++)
159 entXtra->
attrMap.erase(std::string(*itV));
@ Stop
Stop the iteration.
@ Delete
Delete the key-value and proceed to next one.
virtual Action Attr(const char *key, const char *val)=0
bool Add(XrdSecAttr &attr)
XrdSecAttr * Get(const void *sigkey)
std::vector< std::string > Keys()
void List(XrdSecEntityAttrCB &attrCB)
std::vector< XrdSecAttr * > attrVec
std::map< std::string, std::string > attrMap