Raul::Symbol Class Reference

A restricted string (C identifier, which is a component of a Path). More...

#include <Symbol.hpp>

List of all members.

Public Member Functions

 Symbol (const std::basic_string< char > &symbol)
 Construct a Symbol from an std::string.
 Symbol (const char *csymbol)
 Construct a Symbol from a C string.

Static Public Member Functions

static bool is_valid (const std::basic_string< char > &path)
static std::string symbolify (const std::basic_string< char > &str)

Detailed Description

A restricted string (C identifier, which is a component of a Path).

A Symbol is a very restricted string suitable for use as an identifier. It is a valid LV2 symbol, URI fragment, filename, OSC path fragment, and identifier for most programming languages (including C).

Valid characters are _, a-z, A-Z, 0-9, except the first character which must not be 0-9.


Constructor & Destructor Documentation

Raul::Symbol::Symbol ( const std::basic_string< char > &  symbol  )  [inline]

Construct a Symbol from an std::string.

It is a fatal error to construct a Symbol from an invalid string, use is_valid first to check.

Raul::Symbol::Symbol ( const char *  csymbol  )  [inline]

Construct a Symbol from a C string.

It is a fatal error to construct a Symbol from an invalid string, use is_valid first to check.


The documentation for this class was generated from the following file:

Generated on 31 Mar 2010 for RAUL by  doxygen 1.6.1