gui::QSCObject Class Reference

Common base class of all QObject wrappers used in scripting. More...

#include <qscobject.h>

Inheritance diagram for gui::QSCObject:
gui::QSAnnotation gui::QSContentStream gui::QSIProperty gui::QSIPropertyArray gui::QSMenu gui::QSPage gui::QSPdf gui::QSPdfOperator gui::QSPdfOperatorIterator gui::QSPdfOperatorStack gui::QSTreeItem

List of all members.

Public Slots

virtual QString type ()

Public Member Functions

 QSCObject (QString _typeName, BaseCore *_base)
 QSCObject (QSCObject &source)
virtual ~QSCObject ()

Protected Member Functions

bool nullPtr (const void *ptr, const QString &methodName)
template<typename T >
bool nullPtr (boost::shared_ptr< T > ptr, const QString &methodName)
template<typename T >
qobject_cast (QObject *param, const QString &methodName, int paramNum, const QString &expected)

Protected Attributes

BaseCorebase

Private Attributes

QString typeName

Detailed Description

Common base class of all QObject wrappers used in scripting.


Constructor & Destructor Documentation

gui::QSCObject::QSCObject ( QString  _typeName,
BaseCore _base 
)

Construct wrapper with given CObject

Parameters:
_typeName Name of this objects type
_base scripting base for this object

References gui::BaseCore::addGC(), base, and typeName.

gui::QSCObject::QSCObject ( QSCObject source  ) 

Copy constructor

Parameters:
source source object

References gui::BaseCore::addGC(), base, and typeName.

gui::QSCObject::~QSCObject (  )  [virtual]

Member Function Documentation

template<typename T >
bool gui::QSCObject::nullPtr ( boost::shared_ptr< T >  ptr,
const QString &  methodName 
) [inline, protected]

Template variant of nullPtr checking any shared pointer

See also:
nullPtr(void*,const QString &);
Parameters:
ptr Shared pointer to check if it is not empty
methodName Name of method that called this

References nullPtr().

bool gui::QSCObject::nullPtr ( const void *  ptr,
const QString &  methodName 
) [protected]

Check if given pointer is NULL.
If it is, call base error handler for null pointers and return true, otherwise just return false;

Parameters:
ptr Pointer to check if it is not NULL
methodName Name of method, to send to error handler if ptr is NULL

References base, gui::BaseCore::errorNullPointer(), and typeName.

Referenced by gui::QSTreeItem::child(), gui::QSPdfOperator::childCount(), gui::QSPdfOperator::childs(), gui::QSPdfOperator::containsNonStrokingOperator(), gui::QSPdfOperator::containsStrokingOperator(), gui::QSPdf::getActualRevision(), gui::QSTreeItem::getChildNames(), gui::QSPdf::getDictionary(), gui::QSPdf::getFirstPage(), gui::QSPdfOperator::getLastOperator(), gui::QSPdf::getLastPage(), gui::QSPdfOperator::getName(), gui::QSPdf::getNextPage(), gui::QSPdf::getPage(), gui::QSPdf::getPageCount(), gui::QSPdf::getPagePosition(), gui::QSPdf::getPrevPage(), gui::QSPdf::getRevisionsCount(), gui::QSPdfOperator::getText(), gui::QSPdf::hasNextPage(), gui::QSPdf::hasPrevPage(), gui::QSTreeItem::id(), gui::QSPdf::insertPage(), gui::QSPdf::isEncrypted(), gui::QSPdf::isLinearized(), gui::QSPdf::isReadOnly(), gui::QSTreeItem::item(), gui::QSTreeItem::itemref(), gui::QSTreeItem::itemtype(), nullPtr(), gui::QSPdfOperator::paramCount(), gui::QSPdfOperator::params(), gui::QSTreeItem::parent(), gui::QSTreeItem::path(), gui::QSPdfOperator::pushBack(), gui::QSPdf::referenceValid(), gui::QSTreeItem::reload(), gui::QSTreeItem::reload_force(), gui::QSTreeItem::remove(), gui::QSPdfOperator::remove(), gui::QSPdf::removePage(), gui::QSPdf::saveAs(), gui::QSTreeItem::selected(), gui::QSPdfOperator::setNext(), gui::QSTreeItem::setOpen(), gui::QSPdfOperator::setPrev(), gui::QSTreeItem::setSelected(), and gui::QSTreeItem::text().

template<typename T >
T gui::QSCObject::qobject_cast ( QObject *  param,
const QString &  methodName,
int  paramNum,
const QString &  expected 
) [inline, protected]

Template function that will try to dynamic cast object to template type. In case of failure return NULL and pass 'bad parameter' message to script error handler

See also:
Base::errorBadParameter
Parameters:
methodName Name of method that called this
param Parameter number that is being checked
paramNum Position of parameter in parameters
expected Name of type that is expected in parameter

References base, gui::BaseCore::errorBadParameter(), and typeName.

Referenced by gui::QSPdf::getNextPage(), gui::QSPdf::getPagePosition(), gui::QSPdf::getPrevPage(), gui::QSPdf::hasNextPage(), gui::QSPdf::hasPrevPage(), gui::QSPdf::insertPage(), gui::QSPage::moveAbove(), gui::QSPage::moveBelow(), gui::QSPdfOperator::pushBack(), gui::QSPdfOperator::setNext(), and gui::QSPdfOperator::setPrev().

QString gui::QSCObject::type (  )  [virtual, slot]

Return name of this object's type

Returns:
name of this object's type

References typeName.

Referenced by gui::QSTreeItem::itemtype().


Member Data Documentation

Scripting base for this object

Referenced by gui::QSPage::addAnnotation(), gui::QSPage::addSystemType1Font(), gui::QSPage::appendContentStream(), gui::QSPdfOperator::changeableIterator(), gui::QSTreeItem::child(), gui::QSDict::child(), gui::QSArray::child(), gui::QSPdfOperator::childs(), gui::QSPdfOperator::clone(), gui::QSPdfOperatorIterator::copy(), gui::QSPdfOperatorIterator::current(), gui::QSPdfOperatorStack::element(), gui::QSPdfOperatorStack::first(), gui::QSPdfOperator::fontIterator(), gui::QSPage::getChange(), gui::QSPage::getContentStream(), gui::QSPdf::getDictionary(), gui::QSPage::getDictionary(), gui::QSAnnotation::getDictionary(), gui::QSPdf::getFirstPage(), gui::QSPdfOperator::getLastOperator(), gui::QSPdf::getLastPage(), gui::QSPdf::getNextPage(), gui::QSPdf::getPage(), gui::QSAnnotation::getPage(), gui::QSPdf::getPrevPage(), gui::QSPdfOperator::graphicalIterator(), gui::QSPdfOperator::inlineImageIterator(), gui::QSPdf::insertPage(), gui::QSPdfOperator::iterator(), gui::QSPdfOperatorStack::last(), gui::QSPage::moveAbove(), gui::QSPage::moveBelow(), gui::QSPdfOperatorIterator::next(), gui::QSPdfOperator::nonStrokingIterator(), nullPtr(), gui::QSPdfOperator::params(), gui::QSTreeItem::parent(), gui::QSPage::prependContentStream(), gui::QSPdfOperatorIterator::prev(), gui::QSStream::property(), gui::QSIPropertyArray::property(), gui::QSDict::property(), gui::QSArray::property(), gui::QSPdfOperator::pushBack(), qobject_cast(), QSCObject(), gui::QSIProperty::ref(), gui::QSTreeItem::remove(), gui::QSPdfOperator::remove(), gui::QSAnnotation::remove(), gui::QSPdf::removePage(), gui::QSPdf::save(), gui::QSPdf::saveAs(), gui::QSIProperty::set(), gui::QSPage::setMediabox(), gui::QSPdfOperator::setNext(), gui::QSPdfOperator::setPrev(), gui::QSPage::setTransformMatrix(), gui::QSPdfOperatorIterator::stream(), gui::QSPdfOperator::stream(), gui::QSPdfOperator::strokingIterator(), gui::QSPdfOperator::textIterator(), ~QSCObject(), and gui::QSTreeItem::~QSTreeItem().

QString gui::QSCObject::typeName [private]

Name of this objects's type

Referenced by nullPtr(), qobject_cast(), QSCObject(), type(), and ~QSCObject().


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