gtksourceviewmm 3.2.0
Public Types | Public Member Functions | Related Functions
Gsv::Markup Class Reference

It is just a class holding markup string. More...

#include <gtksourceviewmm/markup.h>

List of all members.

Public Types

typedef const void* BoolExpr
 This typedef is just to make it more obvious that our operator const void*() should be used like operator bool().

Public Member Functions

 Markup ()
 Creates empty Markup.
 Markup (const Glib::ustring& markup)
 Creates Markup containing text from markup.
 Markup (const char* markup)
 Creates Markup containing text from markup.
 Markup (const Markup& other)
 Creates Markup containing text from other Markup.
Markupoperator= (const Markup& other)
 Assigns contents of other Markup to this one.
 operator BoolExpr () const
 Checks if Markup is not empty.
bool equal (const Markup& other) const
 Checks if other Markup is the same as this one.
Glib::ustring get_string () const
 Get the string representation of the Markup.
const char* get_c_str () const
 Get the C string representation of the Markup.

Related Functions

(Note that these are not member functions.)

bool operator== (const Markup& lhs, const Markup& rhs)
 See Markup::equal()
bool operator!= (const Markup& lhs, const Markup& rhs)
 See Markup::equal()

Detailed Description

It is just a class holding markup string.

This class exists because now nice constructor overload could be used in some places.

Since gtksourceviewmm 2.10:

Constructor & Destructor Documentation

Gsv::Markup::Markup ( )

Creates empty Markup.

Returns:
A new Markup.
Since gtksourceviewmm 2.10:
Gsv::Markup::Markup ( const Glib::ustring markup) [explicit]

Creates Markup containing text from markup.

Parameters:
markupA markup string.
Returns:
A new Markup.
Since gtksourceviewmm 2.10:
Gsv::Markup::Markup ( const char *  markup) [explicit]

Creates Markup containing text from markup.

Parameters:
markupA markup C string.
Returns:
A new Markup.
Since gtksourceviewmm 2.10:
Gsv::Markup::Markup ( const Markup other)

Creates Markup containing text from other Markup.

Parameters:
otherOther Markup.
Returns:
A new Markup.
Since gtksourceviewmm 2.10:

Member Function Documentation

bool Gsv::Markup::equal ( const Markup other) const

Checks if other Markup is the same as this one.

Parameters:
otherOther Markup.
Returns:
true if both this and other Markup are equal.
Since gtksourceviewmm 2.10:
const char* Gsv::Markup::get_c_str ( ) const

Get the C string representation of the Markup.

Returns:
A C string holding markup.
Since gtksourceviewmm 2.10:
Glib::ustring Gsv::Markup::get_string ( ) const

Get the string representation of the Markup.

Returns:
A string holding markup.
Since gtksourceviewmm 2.10:
Gsv::Markup::operator BoolExpr ( ) const

Checks if Markup is not empty.

For instance,

 if(markup)
   do_something()
Returns:
true if Markup is not empty, otherwise false.
Since gtksourceviewmm 2.10:
Markup& Gsv::Markup::operator= ( const Markup other)

Assigns contents of other Markup to this one.

Parameters:
otherOther Markup.
Returns:
This Markup.
Since gtksourceviewmm 2.10:

Friends And Related Function Documentation

bool operator!= ( const Markup lhs,
const Markup rhs 
) [related]

See Markup::equal()

Parameters:
lhsFirst Markup to compare.
rhsSecond Markup to compare.
Returns:
Whether lhs is different from rhs.
Since gtksourceviewmm 2.10:
bool operator== ( const Markup lhs,
const Markup rhs 
) [related]

See Markup::equal()

Parameters:
lhsFirst Markup to compare.
rhsSecond Markup to compare.
Returns:
Whether lhs is different from rhs.
Since gtksourceviewmm 2.10: