2 * Copyright 2009 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file shibsp/attribute/ExtensibleAttribute.h
20 * An Attribute whose values are arbitrary structures.
23 #ifndef __shibsp_extattr_h__
24 #define __shibsp_extattr_h__
26 #include <shibsp/attribute/Attribute.h>
30 #if defined (_MSC_VER)
31 #pragma warning( push )
32 #pragma warning( disable : 4251 )
36 * An Attribute whose values are arbitrary structures.
38 class SHIBSP_API ExtensibleAttribute : public Attribute
44 * @param ids array with primary identifier in first position, followed by any aliases
45 * @param formatter template for serialization of values
47 ExtensibleAttribute(const std::vector<std::string>& ids, const char* formatter);
50 * Constructs based on a remoted ExtensibleAttribute.
52 * @param in input object containing marshalled ExtensibleAttribute
54 ExtensibleAttribute(DDF& in);
56 virtual ~ExtensibleAttribute();
59 * Returns the set of values in a DDF list.
61 * @return a mutable list object containing the values
65 // Virtual function overrides.
66 size_t valueCount() const;
67 void clearSerializedValues();
68 const char* getString(size_t index) const;
69 const char* getScope(size_t index) const;
70 void removeValue(size_t index);
71 const std::vector<std::string>& getSerializedValues() const;
78 #if defined (_MSC_VER)
79 #pragma warning( pop )
84 #endif /* __shibsp_nameidattr_h__ */