Back to index

unity  6.0.0
Public Member Functions | Private Attributes
unity::glib::String Class Reference

#include <GLibWrapper.h>

Inheritance diagram for unity::glib::String:
Inheritance graph
[legend]
Collaboration diagram for unity::glib::String:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 String ()
 String (gchar *str)
 ~String ()
gchar ** AsOutParam ()
gchar ** operator& ()
 operator bool () const
 operator char * ()
 operator std::string ()
gchar * Value ()
std::string Str () const

Private Attributes

gchar * string_

Detailed Description

Definition at line 106 of file GLibWrapper.h.


Constructor & Destructor Documentation

Definition at line 73 of file GLibWrapper.cpp.

  : string_(0)
{}
unity::glib::String::String ( gchar *  str) [explicit]

Definition at line 77 of file GLibWrapper.cpp.

  : string_(str)
{}

Definition at line 81 of file GLibWrapper.cpp.

{
  if (string_)
    g_free(string_);
}

Member Function Documentation

Definition at line 87 of file GLibWrapper.cpp.

{
  return &string_;
}
unity::glib::String::operator bool ( ) const

Definition at line 112 of file GLibWrapper.cpp.

{
  return bool(string_);
}
unity::glib::String::operator char * ( )

Definition at line 102 of file GLibWrapper.cpp.

{
  return string_;
}
unity::glib::String::operator std::string ( )

Definition at line 107 of file GLibWrapper.cpp.

{
  return Str();
}
gchar ** unity::glib::String::operator& ( )

Definition at line 92 of file GLibWrapper.cpp.

{
  return &string_;
}
std::string unity::glib::String::Str ( ) const

Definition at line 117 of file GLibWrapper.cpp.

{
  if (string_)
    return std::string(string_);
  else
    return std::string("");
}

Definition at line 97 of file GLibWrapper.cpp.

{
  return string_;
}

Here is the caller graph for this function:


Member Data Documentation

gchar* unity::glib::String::string_ [private]

Definition at line 123 of file GLibWrapper.h.


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