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

pdf::core::CRefObj Class Reference

an object that can be referened More...

#include <Object.hh>

Inheritance diagram for pdf::core::CRefObj:

Inheritance graph
Collaboration diagram for pdf::core::CRefObj:

Collaboration graph
List of all members.

Public Methods

Private Attributes

Detailed Description

an object that can be referened

this class represent object that has an identifier. it contain a pointer to an PDF object (CObject) and its ID. the PDF object pointer is owned by this class.

Constructor & Destructor Documentation

pdf::core::CRefObj::CRefObj pdfid_t    id,
CObject   object

constructor to initialize the object ID and pointer. note that the CObject is owned by this class.

00046     : m_id( id ), m_object( object )
00047 {
00048     assert( object != 0 ) ;
00049 }


destructor do nothing. the boost::scoped_ptr will destroy the owned CObject.

00062 {
00063 }

pdf::core::CRefObj::CRefObj const CRefObj &    obj

copy constructor. it will deep copy the underlying object.

00054     : m_id( obj.m_id ), m_object( obj.m_object->Dup( ) )
00055 {
00056 }

Member Function Documentation

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

write the object to the output stream. the object ID will be outputed according to the syntax specified in the PDF spec.

Implements pdf::core::CObject.

00069 {
00070     os << m_id << " 0 obj\n" ;
00071     m_object->Write( os ) ;
00072     return os << "\nendobj\n" ;
00073 }

const CObjRef pdf::core::CRefObj::GetRef   const [inline]

return the reference to this object

00117 { return CObjRef( m_id ) ; }

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

dynamic clone of the object. it will dynamic clone the underlying object.

Implements pdf::core::CObject.

00078 {
00079     return new CRefObj( m_id, m_object->Dup( ) ) ;
00080 }

Member Data Documentation

pdfid_t pdf::core::CRefObj::m_id [private]

the identifier of the object

boost::scoped_ptr<CObject> pdf::core::CRefObj::m_object [private]

the PDF object. owned by this class.

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