Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

mcObject Class Reference

#include <Object.h>

Inheritance diagram for mcObject:

Inheritance graph
[legend]
Collaboration diagram for mcObject:

Collaboration graph
[legend]
List of all members.

Detailed Description

The base class for mcElement.

Provides basic COW services. This class is almost identic to wxObject.

Definition at line 47 of file Object.h.

Public Member Functions

 mcObject ()
 Default constructor.
 mcObject (const mcObject &other)
 Copy constructor.
virtual ~mcObject ()
 Destructor: automatically unreferences the shared data.
mcObjectoperator= (const mcObject &other)
 The assignment operator: it just references the given object.
mcObjectRefDatadata_GetRefData () const
 Returns the shared data.
void data_SetRefData (mcObjectRefData *data)
 Changes the shared data.
virtual void data_Ref (const mcObject &clone)
 Makes a clone of the given object referencing its shared data.
virtual void data_UnRef ()
 eventually deleting it, and sets the reference data to NULL.
virtual mcObjectRefDatadata_MakePrivateCopy ()=0
 Makes a private copy of the currently shared data.

Protected Attributes

mcObjectRefDatamdata_refData
 The data shared by this mcObject.


Constructor & Destructor Documentation

mcObject::mcObject  )  [inline]
 

Default constructor.

Definition at line 57 of file Object.h.

References mdata_refData.

mcObject::mcObject const mcObject other  )  [inline]
 

Copy constructor.

Definition at line 60 of file Object.h.

References data_Ref(), and mdata_refData.

virtual mcObject::~mcObject  )  [inline, virtual]
 

Destructor: automatically unreferences the shared data.

Definition at line 63 of file Object.h.

References data_UnRef().


Member Function Documentation

mcObjectRefData* mcObject::data_GetRefData  )  const [inline]
 

Returns the shared data.

Definition at line 77 of file Object.h.

References mdata_refData.

Referenced by mcElement::chlp(), mcElement::data_MakePrivateCopy(), mcElementHelpers::math_Replace(), mcElement::mcElement(), and mcElement::~mcElement().

virtual mcObjectRefData* mcObject::data_MakePrivateCopy  )  [pure virtual]
 

Makes a private copy of the currently shared data.

Implemented in mcElement.

Referenced by data_Ref().

void mcObject::data_Ref const mcObject clone  )  [virtual]
 

Makes a clone of the given object referencing its shared data.

Reimplemented in mcElement.

Definition at line 55 of file Object.cpp.

References mcObjectRefData::data_IncRefCount(), data_MakePrivateCopy(), data_UnRef(), and mdata_refData.

Referenced by mcElement::data_Ref(), mcObject(), and operator=().

void mcObject::data_SetRefData mcObjectRefData data  )  [inline]
 

Changes the shared data.

Definition at line 80 of file Object.h.

References mdata_refData.

Referenced by mcExpElementHelpers::data_CreateExpSub(), mcElement::data_MakePrivateCopy(), mcBracket::mcBracket(), mcElement::mcElement(), mcFraction::mcFraction(), mcMathAndSystem::mcMathAndSystem(), mcMathLine::mcMathLine(), mcMathMng::mcMathMng(), mcMathOrSystem::mcMathOrSystem(), mcMonomial::mcMonomial(), mcNumber::mcNumber(), mcPolynomial::mcPolynomial(), mcRadical::mcRadical(), and mcSymbol::mcSymbol().

void mcObject::data_UnRef  )  [virtual]
 

eventually deleting it, and sets the reference data to NULL.

Definition at line 76 of file Object.cpp.

References mcObjectRefData::data_DecRefCount(), mcObjectRefData::data_GetRefCount(), mcLOG, and mdata_refData.

Referenced by mcElement::data_MakePrivateCopy(), data_Ref(), operator=(), and ~mcObject().

mcObject& mcObject::operator= const mcObject other  )  [inline]
 

The assignment operator: it just references the given object.

Definition at line 67 of file Object.h.

References data_Ref(), and data_UnRef().


Member Data Documentation

mcObjectRefData* mcObject::mdata_refData [protected]
 

The data shared by this mcObject.

Definition at line 52 of file Object.h.

Referenced by data_GetRefData(), data_Ref(), data_SetRefData(), data_UnRef(), and mcObject().


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

Documentation generated with Doxygen on Sun Feb 6 17:12:59 2005
Visit MathStudio home page for more info

[ Top ]