XdkWrl: MFString Class Reference

Home | Hierarchy | Members | Alphabetical | Related Pages

# MFString Class Reference
[Field Types]

`#include <mfstring.h>`

Inherits deque.

List of all members.

## Static Public Member Functions
static const char * | typeName ()
static FieldTypeId | typeId ()
## Friends
std::ostream & | operator<< (std::ostream &s, const MFString &f)

## Detailed Description

A MFString is a container of SFString. It is implemented using a STL's deque so you can benefit from its interface. Most common functionnalities you would use are:

       MFString mf;
       mf.push_back(SFString("hello"));  // push_back("hello"); would fail since
       mf.push_front(SFString("world")); // constructor SFString(const char*) is explicit
       mf[0] = "Bye"; // Valid since SFString has operator=(const char*)

but since it uses STL principles, you have all useful concepts such as iterator, algorithms, etc...

Below is included the documentation for this field type from the ISO standard.

## 5.9 SFString and MFString

The SFString and MFString fields and events contain strings formatted with the UTF-8 universal character set (see 2.[UTF8]). SFString specifies a single string. The MFString specifies zero or more strings. Strings are written to the VRML file as a sequence of UTF-8 octets enclosed in double quotes (e.g., `"string"`).

Any characters (including linefeeds and '#') may appear within the quotes. A double quote character within the string is preceded with a backslash. A backslash character within the string is also preceded with a backslash forming two backslashes. For example:

        fooString [ "One, Two, Three", "He said, \"Immel did it!\"" ]

is an MFString field, fooString, with two valid strings.

The initial value of an SFString eventOut is "" (the empty string). The initial value of an MFString eventOut is [ ].

## Member Function Documentation

const char * typeName | ( |  | ) | `[inline, static]`

FieldTypeId typeId | ( |  | ) | `[inline, static]`

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | s,
|  | const MFString & | f |
| ) |  |  | `[friend]`

Generated on 5 Jan 2007 with version 1.5.1. |