Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkStringOps.h File Reference

#include "vtkExtensionsCommonConfigure.h"
#include "vtkExtensionsTypes.h"
#include "vtkExtensionsExceptions.h"
#include "vtkIOStream.h"
#include <cerrno>

Include dependency graph for vtkStringOps.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  vtkStringOps
 Convert character encodings and perform common string operations. More...

class  vtkStringOps::ToLatin1
 Nested convenience class for easy (though not terribly efficient) trancoding of UTF-16 or UTF-8 data to Latin-1. More...

class  vtkStringOps::ToUTF8
 Nested convenience class for easy (though not terribly efficient) trancoding of UTF-16 or Latin-1 data to UTF-8. More...

class  vtkStringOps::ToUTF16
 Nested convenience class for easy (though not terribly efficient) trancoding of Latin-1 or UTF-8 data to UTF-16 data. More...

class  vtkStringOps::Janitor< T >
 Garbage collector for dynamically allocated arrays or strings. More...


Defines

#define LATIN1_TO_UTF16(_str)   vtkStringOps::ToUTF16(static_cast<const char*>(_str)).data()
#define UTF8_TO_UTF16(_str)   vtkStringOps::ToUTF16(static_cast<const vtkUTF8ChType*>(_str)).data()
#define LATIN1_TO_UTF8(_str)   vtkStringOps::ToUTF8(static_cast<const char*>(_str)).data()
#define UTF16_TO_UTF8(_str)   vtkStringOps::ToUTF8(static_cast<const vtkUTF16ChType*>(_str)).data()
#define UTF8_TO_LATIN1(_str)   vtkStringOps::ToLatin1(static_cast<const vtkUTF8ChType*>(_str)).data()
#define UTF16_TO_LATIN1(_str)   vtkStringOps::ToLatin1(static_cast<const vtkUTF16ChType*>(_str)).data()
#define XML_TO_LATIN1(_str)   vtkStringOps::ToLatin1(_str).data()
#define LATIN1_TMP(_x)   vtkStringOps::Janitor<char>(static_cast<char*>(_x)).data()
#define UTF8_TMP(_x)   vtkStringOps::Janitor<vtkUTF8ChType>(static_cast<vtkUTF8ChType*>(_x)).data()
#define UTF16_TMP(_x)   vtkStringOps::Janitor<vtkUTF16ChType>(static_cast<vtkUTF16ChType*>(_x)).data()
#define vtkSetXMLStringBodyMacro(_name, _arg)
 This macro defines the body of a set XML string macro.

#define vtkCxxSetXMLStringMacro(_class, _name, _type)
 Set XML character string.

#define vtkSetXMLStringMacro(_name, _type)
 Set XML character string.

#define vtkCxxGetXMLStringMacro(_class, _name, _type)
 Get XML character string.

#define vtkGetXMLStringMacro(_name, _type)
 Get XML character string.

#define vtkCxxXMLStringMacro(_class, _name, _type)
 Implement XML string setter and getter members.


Functions

ostream & operator<< (ostream &aTarget, const vtkStringOps::ToLatin1 &a)
ostream & operator<< (ostream &aTarget, const vtkStringOps::ToUTF8 &a)


Define Documentation

#define LATIN1_TMP _x   )     vtkStringOps::Janitor<char>(static_cast<char*>(_x)).data()
 

Definition at line 1095 of file vtkStringOps.h.

#define LATIN1_TO_UTF16 _str   )     vtkStringOps::ToUTF16(static_cast<const char*>(_str)).data()
 

Definition at line 1080 of file vtkStringOps.h.

Referenced by vtkStringStringMap::Erase(), vtkStringEnumerator::Erase(), vtkStringStringMap::Find(), vtkStringEnumerator::Find(), vtkStringStringMap::Insert(), and vtkStringEnumerator::Insert().

#define LATIN1_TO_UTF8 _str   )     vtkStringOps::ToUTF8(static_cast<const char*>(_str)).data()
 

Definition at line 1084 of file vtkStringOps.h.

#define UTF16_TMP _x   )     vtkStringOps::Janitor<vtkUTF16ChType>(static_cast<vtkUTF16ChType*>(_x)).data()
 

Definition at line 1099 of file vtkStringOps.h.

#define UTF16_TO_LATIN1 _str   )     vtkStringOps::ToLatin1(static_cast<const vtkUTF16ChType*>(_str)).data()
 

Definition at line 1090 of file vtkStringOps.h.

#define UTF16_TO_UTF8 _str   )     vtkStringOps::ToUTF8(static_cast<const vtkUTF16ChType*>(_str)).data()
 

Definition at line 1086 of file vtkStringOps.h.

#define UTF8_TMP _x   )     vtkStringOps::Janitor<vtkUTF8ChType>(static_cast<vtkUTF8ChType*>(_x)).data()
 

Definition at line 1097 of file vtkStringOps.h.

#define UTF8_TO_LATIN1 _str   )     vtkStringOps::ToLatin1(static_cast<const vtkUTF8ChType*>(_str)).data()
 

Definition at line 1088 of file vtkStringOps.h.

#define UTF8_TO_UTF16 _str   )     vtkStringOps::ToUTF16(static_cast<const vtkUTF8ChType*>(_str)).data()
 

Definition at line 1082 of file vtkStringOps.h.

Referenced by vtkStringStringMap::Erase(), vtkStringEnumerator::Erase(), vtkStringStringMap::Find(), vtkStringEnumerator::Find(), vtkStringStringMap::Insert(), and vtkStringEnumerator::Insert().

#define vtkCxxGetXMLStringMacro _class,
_name,
_type   ) 
 

Value:

_type* _class::Get##_name (void) const \ { \ vtkDebugMacro(<< "Get" << #_name "() returning \"" \ << (this->_name!=NULL?XML_TO_LATIN1(this->_name):"") \ << "\"."); \ return this->_name; \ }
Get XML character string.

Creates implementation member:

* "_type"* "_class"::Get"_name" (void) const *

(e.g., const vtkXMLChType* MyClass::GetFilename (void) const);

Definition at line 1160 of file vtkStringOps.h.

#define vtkCxxSetXMLStringMacro _class,
_name,
_type   ) 
 

Value:

void _class::Set##_name (const _type* const& _arg) \ { \ vtkSetXMLStringBodyMacro(_name, _arg); \ }
Set XML character string.

Creates implementation member:

* void "_class"::Set"_name"(const "_type"* const&) *

(e.g., MyClass::SetFilename(const vtkXMLChType* const&));

Definition at line 1130 of file vtkStringOps.h.

#define vtkCxxXMLStringMacro _class,
_name,
_type   ) 
 

Value:

vtkCxxSetXMLStringMacro(_class, _name, _type); \ vtkCxxGetXMLStringMacro(_class, _name, _type);
Implement XML string setter and getter members.

Definition at line 1188 of file vtkStringOps.h.

#define vtkGetXMLStringMacro _name,
_type   ) 
 

Value:

_type* Get##_name (void) const \ { \ vtkDebugMacro(<< "Get" << #_name "() returning \"" \ << (this->_name!=NULL?XML_TO_LATIN1(this->_name):"") \ << "\"."); \ return this->_name; \ }
Get XML character string.

Creates inline member:

* inline "_type"* Get"_name" (void) const *

(e.g., const vtkXMLChType* GetFilename (void) const);

Definition at line 1178 of file vtkStringOps.h.

#define vtkSetXMLStringBodyMacro _name,
_arg   ) 
 

Value:

{ \ vtkDebugMacro(<< "Set" << #_name "(\"" \ << (_arg!=NULL?XML_TO_LATIN1(_arg):"") << "\")" ); \ if ( this->_name == NULL && _arg == NULL ) { return; } \ if ( this->_name != NULL && _arg != NULL && \ vtkStringOps::Equals(this->_name, _arg) ) { return; } \ if (this->_name != NULL) { vtkStringOps::Release(&(this->_name)); } \ if (_arg != NULL) { this->_name = vtkStringOps::Duplicate(_arg); } \ this->Modified(); \ }
This macro defines the body of a set XML string macro.

It can be used either in the header file vtkSetXMLStringMacro or in the implementation vtkCxxSetXMLStringMacro. It releases the currently held string and then duplicates the input string if they are not equivalent.

Definition at line 1109 of file vtkStringOps.h.

Referenced by vtkPaletteElement::SetID().

#define vtkSetXMLStringMacro _name,
_type   ) 
 

Value:

void Set##_name (const _type* const& _arg) \ { \ vtkSetXMLStringBodyMacro(_name, _arg); \ }
Set XML character string.

Creates inline member

* inline void Set"_name"(const "_type"* const&); *

(e.g., SetFilename(const vtkXMLChType* const&));

Definition at line 1145 of file vtkStringOps.h.

#define XML_TO_LATIN1 _str   )     vtkStringOps::ToLatin1(_str).data()
 

Definition at line 1092 of file vtkStringOps.h.


Function Documentation

ostream& operator<< ostream &  aTarget,
const vtkStringOps::ToUTF8 a
[inline]
 

Definition at line 4622 of file vtkStringOps.h.

References vtkStringOps::ToUTF8::data().

ostream& operator<< ostream &  aTarget,
const vtkStringOps::ToLatin1 a
[inline]
 

Definition at line 4614 of file vtkStringOps.h.

References vtkStringOps::ToLatin1::data().


Generated on Tue Aug 10 03:41:32 2004 for vtkExtensions by doxygen 1.3.7