1#if !defined(HIDDEN_FROM_DOC)
2#if !defined _SB_CONST_CHAR_MAP_H_
3#define _SB_CONST_CHAR_MAP_H_
26#include <Inventor/STL/map>
27#include <Inventor/STL/functional>
48 bool operator() (
const char* str1,
const char* str2)
const
52 return strcmp(str1, str2) < 0;
57 typedef typename std::map<const char*, T , StrCompare> UniformMap;
58 typedef typename UniformMap::value_type
value_type;
59 typedef typename UniformMap::iterator
iterator;
64 {
return m_uniforms.begin(); }
68 {
return m_uniforms.begin(); }
72 {
return m_uniforms.end(); }
76 {
return m_uniforms.end(); }
80 {
return m_uniforms.empty(); }
84 {
return m_uniforms.size(); }
88 {
return m_uniforms.find(key); }
92 {
return m_uniforms.find(key); }
97 free((
void*)it->first);
98 return m_uniforms.erase(it);
105 while(it!=m_uniforms.end())
107 free((
void*)it->first);
114 T& operator[] (
const char* name )
120 return m_uniforms[_strdup(name)];
122 return m_uniforms[
strdup(name)];
126 return ((*it).second);
130 SbConstCharMap<T>&
operator=(
const SbConstCharMap<T>& copyFrom)
137 while(it!=copyFrom.end())
140 insertedIt = m_uniforms.insert(insertedIt,
value_type(_strdup((*it).first),(*it).second));
142 insertedIt = m_uniforms.insert(insertedIt,
value_type(
strdup((*it).first),(*it).second));
150 friend int operator !=(
const SbConstCharMap<T>& map1,
const SbConstCharMap<T>& map2)
151 {
return !(map1==map2); }
154 friend int operator ==(
const SbConstCharMap<T>& map1,
const SbConstCharMap<T>& map2)
156 if ( map1.size() != map2.size() )
162 for (; it1 != itEnd1; ++it1, ++it2)
164 if ( it1->second != it2->second )
169 else if ( strcmp(it1->first, it2->first) != 0 )
177 UniformMap m_uniforms;
virtual SbBool operator()(SoGraphicConfig *const &gc1, SoGraphicConfig *const &gc2) const
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Defines an OpenG...
valueRef operator=(valueRef newValue)
Sets this field to newValue.
int operator==(const className &f) const
Returns TRUE if otherField is of the same type and has the same value as this field.
int operator!=(const className &f) const
Returns FALSE if otherField is of the same type and has the same value as this field.
AuditorListValue value_type
ListContainer::const_iterator const_iterator
ListContainer::iterator iterator