28 #ifndef __SFSTRING_H__
29 #define __SFSTRING_H__
45 virtual X3DTypes::X3DType
getX3DType() {
return X3DTypes::SFSTRING; }
52 valid_values.insert( s );
59 template<
class InputIterator >
61 valid_values.insert( begin, end );
67 return valid_values.find( s ) != valid_values.end();
73 return valid_values.size() > 0;
87 set< string > valid_values;
Contains the SField template class.
virtual X3DTypes::X3DType getX3DType()
Returns the X3DType of the field.
Definition: Field.h:138
The SFString field contains a string.
Definition: SFString.h:41
bool isValidValue(const string &s)
Returns true if the given string is one of the specified valid values for the field.
Definition: SFString.h:66
void clearValidValues()
Clears the valid values for the field.
Definition: SFString.h:82
bool hasValidValues()
Returns true if any valid values have been specified for the field.
Definition: SFString.h:72
const set< string > & getValidValues()
Returns the valid values for the field.
Definition: SFString.h:77
void addValidValues(InputIterator begin, InputIterator end)
Add valid values for the string.
Definition: SFString.h:60
void addValidValue(const string &s)
Add a valid value for the string.
Definition: SFString.h:51
Template class that adds the Field mechanisms to an encapsulated value of specified type.
Definition: SField.h:90
static string classTypeName()
Returns a string name for this field type e.g. SFInt32.
Definition: SField.h:169
H3D API namespace.
Definition: Anchor.h:38