My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DotConstString Class Reference

#include <dot.h>

Public Member Functions

 DotConstString ()
 
 ~DotConstString ()
 
 DotConstString (const QCString &s)
 
 DotConstString (const DotConstString &s)
 
const char * data () const
 
bool isEmpty () const
 
void set (const QCString &s)
 

Private Member Functions

DotConstStringoperator= (const DotConstString &)
 

Private Attributes

char * m_str
 

Detailed Description

Minimal constant string class that is thread safe, once initialized.

Definition at line 338 of file dot.h.

Constructor & Destructor Documentation

DotConstString::DotConstString ( )
inline

Definition at line 341 of file dot.h.

References m_str.

{ m_str=0; }
DotConstString::~DotConstString ( )
inline

Definition at line 342 of file dot.h.

References m_str.

{ delete[] m_str; }
DotConstString::DotConstString ( const QCString &  s)
inline

Definition at line 343 of file dot.h.

: m_str(0) { set(s); }
DotConstString::DotConstString ( const DotConstString s)
inline

Definition at line 344 of file dot.h.

References data().

: m_str(0) { set(s.data()); }

Member Function Documentation

const char* DotConstString::data ( ) const
inline

Definition at line 345 of file dot.h.

References m_str.

Referenced by DotWorkerThread::cleanup(), DotConstString(), and DotRunner::run().

{ return m_str; }
bool DotConstString::isEmpty ( ) const
inline

Definition at line 346 of file dot.h.

References m_str.

Referenced by DotRunner::run(), and DotWorkerThread::run().

{ return m_str==0 || m_str[0]=='\0'; }
DotConstString& DotConstString::operator= ( const DotConstString )
private
void DotConstString::set ( const QCString &  s)
inline

Definition at line 347 of file dot.h.

References m_str.

Referenced by DotRunner::addPostProcessing(), and DotRunner::run().

{
delete[] m_str;
m_str=0;
if (!s.isEmpty())
{
m_str=new char[s.length()+1];
qstrcpy(m_str,s.data());
}
}

Member Data Documentation

char* DotConstString::m_str
private

Definition at line 359 of file dot.h.

Referenced by data(), DotConstString(), isEmpty(), set(), and ~DotConstString().


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