Py::String Class Reference

#include <Objects.hxx>

Inheritance diagram for Py::String:
Py::SeqBase< Char > Py::Object

List of all members.

Public Member Functions

virtual bool accepts (PyObject *pyob) const
std::string as_std_string (const char *encoding, const char *error="strict") const
std::string as_std_string () const
unicodestring as_unicodestring () const
virtual size_type capacity () const
String decode (const char *encoding, const char *error="strict")
String encode (const char *encoding, const char *error="strict") const
 operator std::string () const
Stringoperator= (const unicodestring &v)
Stringoperator= (const std::string &v)
Stringoperator= (PyObject *rhsp)
Stringoperator= (const Object &rhs)
virtual size_type size () const
 String (const char *v)
 String (const char *v, int vsize)
 String (const std::string &v, std::string::size_type vsize)
 String (const std::string &s, const char *encoding, const char *error="strict")
 String (const char *s, int len, const char *encoding, const char *error="strict")
 String (const char *s, const char *encoding, const char *error="strict")
 String (const std::string &v)
 String ()
 String (const Object &ob)
 String (PyObject *pyob, bool owned=false)

Detailed Description

Definition at line 2124 of file Python2/Objects.hxx.


Constructor & Destructor Documentation

Py::String::String ( PyObject pyob,
bool  owned = false 
) [inline, explicit]

Definition at line 2132 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const Object ob  )  [inline]

Definition at line 2137 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String (  )  [inline]

Definition at line 2142 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const std::string &  v  )  [inline]

Definition at line 2148 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const char *  s,
const char *  encoding,
const char *  error = "strict" 
) [inline]

Definition at line 2155 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const char *  s,
int  len,
const char *  encoding,
const char *  error = "strict" 
) [inline]

Definition at line 2161 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const std::string &  s,
const char *  encoding,
const char *  error = "strict" 
) [inline]

Definition at line 2167 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const std::string &  v,
std::string::size_type  vsize 
) [inline]

Definition at line 2173 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const char *  v,
int  vsize 
) [inline]

Definition at line 2180 of file Python2/Objects.hxx.

References Py::Object::validate().

Py::String::String ( const char *  v  )  [inline]

Definition at line 2186 of file Python2/Objects.hxx.

References Py::Object::validate().


Member Function Documentation

virtual bool Py::String::accepts ( PyObject pyob  )  const [inline, virtual]

Reimplemented from Py::SeqBase< Char >.

Definition at line 2206 of file Python2/Objects.hxx.

References Py::_String_Check(), and Py::_Unicode_Check().

std::string Py::String::as_std_string ( const char *  encoding,
const char *  error = "strict" 
) const
std::string Py::String::as_std_string (  )  const [inline]
unicodestring Py::String::as_unicodestring (  )  const [inline]

Definition at line 2276 of file Python2/Objects.hxx.

virtual size_type Py::String::capacity (  )  const [inline, virtual]

Reimplemented from Py::SeqBase< Char >.

Definition at line 2127 of file Python2/Objects.hxx.

References Py::SeqBase< T >::max_size().

String Py::String::decode ( const char *  encoding,
const char *  error = "strict" 
) [inline]
String Py::String::encode ( const char *  encoding,
const char *  error = "strict" 
) const [inline]
Py::String::operator std::string (  )  const [inline]

Definition at line 2257 of file Python2/Objects.hxx.

References as_std_string().

String& Py::String::operator= ( const unicodestring v  )  [inline]

Definition at line 2218 of file Python2/Objects.hxx.

String& Py::String::operator= ( const std::string &  v  )  [inline]

Definition at line 2212 of file Python2/Objects.hxx.

String& Py::String::operator= ( PyObject rhsp  )  [inline]

Reimplemented from Py::SeqBase< Char >.

Definition at line 2198 of file Python2/Objects.hxx.

References Py::Object::ptr().

String& Py::String::operator= ( const Object rhs  )  [inline]

Reimplemented from Py::SeqBase< Char >.

Definition at line 2193 of file Python2/Objects.hxx.

virtual size_type Py::String::size (  )  const [inline, virtual]

Reimplemented from Py::SeqBase< Char >.

Definition at line 2245 of file Python2/Objects.hxx.

References Py::Object::isUnicode(), and Py::Object::ptr().

Referenced by Gui::PythonStderr::write(), and Gui::PythonStdout::write().


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

Generated on Wed Nov 23 19:02:44 2011 for FreeCAD by  doxygen 1.6.1