cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataVisitor Class Referenceabstract

Visitor that helps to perform action that depends on polymorphic object type. More...

#include <CCDataVisitor.h>

Inheritance diagram for DataVisitor:
PrettyPrinter

Public Member Functions

virtual ~DataVisitor ()
virtual void visitObject (const Object *p)=0
 default method, called from non-overloaded methods and for unrecognized objects More...
 
local visitObject ( local p)
 default method, called from non-overloaded methods and for unrecognized objects More...
 
virtual void visit (const Bool *p)
var visit ( var p)
local visit ( local p)
virtual void visit (const Integer *p)
local visit ( local p)
virtual void visit (const Float *p)
virtual void visit (const Double *p)
virtual void visit (const String *p)
virtual void visit (const Array *p)
virtual void visit (const Dictionary *p)
local visit ( local p)
virtual void visit (const Set *p)
virtual void visit (const Data *p)

Detailed Description

Visitor that helps to perform action that depends on polymorphic object type.

Use cases:

Usage:

  1. subclass DataVisitor
  2. overload visit() methods for object that you need to handle
  3. handle other objects in visitObject()
  4. pass your visitor to Object::acceptVisitor()

Constructor & Destructor Documentation

virtual ~DataVisitor ( )
inlinevirtual

Member Function Documentation

virtual void visit ( const Bool p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Integer p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Float p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Double p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const String p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Array p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Dictionary p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Set p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visit ( const Data p)
virtual

Reimplemented in PrettyPrinter.

var visit ( var  p)
virtual

Reimplemented in PrettyPrinter.

local visit ( local  p)
virtual

Reimplemented in PrettyPrinter.

virtual void visitObject ( const Object p)
pure virtual

default method, called from non-overloaded methods and for unrecognized objects

Implemented in PrettyPrinter.

var visitObject ( var  p)
pure virtual

default method, called from non-overloaded methods and for unrecognized objects

Implemented in PrettyPrinter.

local visitObject ( local  p)
pure virtual

default method, called from non-overloaded methods and for unrecognized objects

Implemented in PrettyPrinter.


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