gtksourceviewmm  3.21.3
Public Types | Public Member Functions | Protected Attributes | Related Functions | List of all members
Gsv::Markup Class Reference

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

#include <gtksourceviewmm/markup.h>

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(). More...
 

Public Member Functions

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

Protected Attributes

Glib::ustring markup_
 

Related Functions

(Note that these are not member functions.)

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

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:

Member Typedef Documentation

typedef const void* Gsv::Markup::BoolExpr

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

Deprecated:
Use the explicit operator bool() instead.

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 ( )
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 bool ( ) const
explicit

Checks if Markup is not empty.

For instance,

if(markup)
do_something()
Returns
true if Markup is not empty, otherwise false.
Since gtksourceviewmm 3.20:
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:
Deprecated:
Use the explicit operator bool() instead.
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:

Member Data Documentation

Glib::ustring Gsv::Markup::markup_
protected