Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

pdf::core::CName Class Reference

the PDF name class More...

#include <Object.hh>

Inheritance diagram for pdf::core::CName:

Inheritance graph
[legend]
Collaboration diagram for pdf::core::CName:

Collaboration graph
[legend]
List of all members.

Public Methods

Private Attributes


Detailed Description

the PDF name class

a class to represent names in PDF document. a PDF name is a string start with a slash character. it is used as a key in PDF dictionaries.

See also:
CDictionary


Constructor & Destructor Documentation

pdf::core::CName::CName const std::string &    name [inline, explicit]
 

constructor to initialize the string.

Parameters:
name  should not contain the slash character

00199 : m_name( name ) { }

pdf::core::CName::~CName   [inline]
 

destructor do nothing

00204 { }


Member Function Documentation

std::ostream & pdf::core::CName::Write std::ostream &    os const [virtual]
 

write out the name. the slash character is printed before the name.

Implements pdf::core::CObject.

00141 {
00142     return os << '/' << m_name ;
00143 }

CObject * pdf::core::CName::Dup   const [virtual]
 

dynamic clone

Implements pdf::core::CObject.

00148 {
00149     return new CName( m_name ) ;
00150 }

bool pdf::core::CName::empty   const [inline]
 

return true if the name is empty

00217 { return m_name.empty( ) ; }

bool pdf::core::CName::operator== const CName &    n const [inline]
 

equality operator. need for std::find( )

00220 { return m_name == n.m_name ; }

bool pdf::core::CName::operator!= const CName &    n const [inline]
 

inequality operator. added for symmetry

00223 { return !operator==( n ) ; }


Member Data Documentation

std::string pdf::core::CName::m_name [private]
 

the name string. excluding the slash


The documentation for this class was generated from the following files:
Generated on Sun Feb 2 09:17:17 2003 for libpdf++ by doxygen1.2.16