Oxygine  1
2g game engine
oxygine-forwards.h
1 #pragma once
2 #include "core/ref_counter.h"
3 #include "closure/closure.h"
4 
5 
6 #ifdef OXYGINE_SDL
7 typedef struct SDL_Window SDL_Window;
8 #endif
9 
10 #define DECLARE_SMART(class_name, spname) \
11  class class_name;\
12  typedef oxygine::intrusive_ptr<class_name> spname;
13 
14 #define DECLARENS_SMART(name_space, class_name, spname) \
15  namespace name_space \
16  {\
17  class class_name;\
18  typedef oxygine::intrusive_ptr<class_name> spname;\
19  }
20 
21 
22 struct SDL_KeyboardEvent;
23 
24 namespace pugi
25 {
26  class xml_node;
27 }
28 namespace oxygine
29 {
30  namespace text
31  {
32  class Node;
33  struct Symbol;
34  }
35 
36  template <class T>
37  class intrusive_ptr;
38 
39  DECLARE_SMART(Actor, spActor);
40  DECLARE_SMART(AsyncTask, spAsyncTask);
41  DECLARE_SMART(Box9Sprite, spBox9Sprite);
42  DECLARE_SMART(Button, spButton);
43  DECLARE_SMART(ClipRectActor, spClipRectActor);
44  DECLARE_SMART(Clock, spClock);
45  DECLARE_SMART(ColorRectSprite, spColorRectSprite);
46  DECLARE_SMART(DebugActor, spDebugActor);
47  DECLARE_SMART(DragHandler, spDragHandler);
48  DECLARE_SMART(EventDispatcher, spEventDispatcher);
49  DECLARE_SMART(HttpRequestTask, spHttpRequestTask);
50  DECLARE_SMART(InputText, spInputText);
51  DECLARE_SMART(MaskedSprite, spMaskedSprite);
52  DECLARE_SMART(NativeTexture, spNativeTexture);
53  DECLARE_SMART(Object, spObject);
54  DECLARE_SMART(Polygon, spPolygon);
55  DECLARE_SMART(ProgressBar, spProgressBar);
56  DECLARE_SMART(RenderTexture, spRenderTexture);
57  DECLARE_SMART(ResAnim, spResAnim);
58  DECLARE_SMART(ResBuffer, spResBuffer);
59  DECLARE_SMART(ResFont, spResFont);
60  DECLARE_SMART(Resource, spResource);
61  DECLARE_SMART(STDMaterial, spSTDMaterial);
62  DECLARE_SMART(SlidingActor, spSlidingActor);
63  DECLARE_SMART(Sprite, spSprite);
64  DECLARE_SMART(Stage, spStage);
65  DECLARE_SMART(TextField, spTextField);
66  DECLARE_SMART(Texture, spTexture);
67  DECLARE_SMART(ThreadLoader, spThreadLoader);
68  DECLARE_SMART(Tween, spTween);
69  DECLARE_SMART(TweenQueue, spTweenQueue);
70  DECLARE_SMART(WebImage, spWebImage);
71 
72  class Actor;
73  class AnimationFrame;
74  class ClipRectActor;
75  class Color;
76  class ColorRectSprite;
77  class CreateResourceContext;
78  class DebugActor;
79  class Event;
80  class EventState;
81  class Font;
82  class IVideoDriver;
83  class Image;
84  class ImageData;
85  class LoadResourcesContext;
86  class MaskedSprite;
87  class Material;
88  class Mem2Native;
89  class Mutex;
90  class PointerState;
91  class PostProcessOptions;
92  class ProgressBar;
93  class RenderState;
94  class ResAnim;
95  class ResAtlas;
96  class ResFont;
97  class ResFontBM;
98  class ResStarlingAtlas;
99  class Resource;
100  class Resources;
101  class ResourcesLoadOptions;
102  class Restorable;
103  class ShaderProgram;
104  class SingleResAnim;
105  class Sprite;
106  class TextField;
107  class ThreadDispatcher;
108  class TouchEvent;
109  class Tween;
110  class TweenOptions;
111  class UberShaderProgram;
112  class UpdateState;
113  class VertexDeclaration;
114  class XmlWalker;
115  struct deserializeLinkData;
116  struct deserializedata;
117  struct serializedata;
118 
119  const int cloneOptionsDoNotCloneClildren = 0x01;
120  const int cloneOptionsResetTransform = 0x02;
121 
122  typedef Closure<void(Event* ev)> EventCallback;
123  typedef Closure<void(const RenderState& rs)> RenderCallback;
124  typedef Closure<void(const UpdateState& us)> UpdateCallback;
125  typedef int cloneOptions;
126  typedef int copyOptions;//deprecated typedef
127  typedef int eventType;
128  typedef unsigned int dumpOptions;
129  typedef unsigned int glyphOptions;
130  typedef void* nativeTextureHandle;
131 
132 
133 #define DECLARE_COPYCLONE(type) type(const type &src, cloneOptions);\
134  virtual type* clone(cloneOptions opt=0) const override {return new type(*this, opt);}\
135 
136 
137 #define DECLARE_COPYCLONE_NEW(type) type(const type &src, cloneOptions opt = 0){copyFrom(src, opt);}\
138  virtual type* clone(cloneOptions opt=0) const override {type *tp = new type(); tp->copyFrom(*this, opt); return tp;}\
139  void copyFrom(const type &src, cloneOptions opt = 0);
140 
141 #define DECLARE_COPYCLONE_NEW2(type) type(const type &src, cloneOptions opt = 0);\
142  virtual type* clone(cloneOptions opt=0) const override;\
143  void copyFrom(const type &src, cloneOptions opt = 0);
144 
145 #define CREATE_COPYCLONE_NEW(type) type::type(const type &src, cloneOptions opt){copyFrom(src, opt);}\
146  type* type::clone(cloneOptions opt) const {type *tp = new type(); tp->copyFrom(*this, opt); return tp;}
147 
148 }
–oxgl-end–!
Definition: Actor.h:14
Definition: oxygine-forwards.h:24