PCMNode.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00027 
00028 #ifndef __PCM_NODE_H__
00029 #  define __PCM_NODE_H__
00030 
00031 
00032 
00033 
00034 
00035 #  include "PCMPremeditations.h"
00036 
00037 #  include "PCMName.h"
00038 
00039 #  include "PCMException.h"
00040 
00041 #  include "PCMLogger.h"
00042 
00043 #  include "PCMPointer.h"
00044 
00045 #  include "PCMProcess.h"
00046 
00047 #  include "PCMOutputNode.h"
00048 
00049 #  include "PCMContainer.h"
00050 
00051 #  include "PCMBuffer.h"
00052 
00053 
00054 
00055 
00056 
00057 #  include <pcapi.h>
00058 
00059 
00060 
00061 
00062 
00063 #  include <squirrel/squirrel.h>
00064 #  include <squirrel/sqstdio.h>
00065 #  include <squirrel/sqstdaux.h>
00066 #  include <squirrel/sqplus.h>
00067 
00068 namespace ParCompMark
00069 {
00070 
00075   class Node:public Name
00076   {
00077 
00078         
00079         
00080         
00081 #  ifdef PARCOMPMARK_TEST
00082         friend class ParCompMarkTest::TestNode;
00083 #  endif
00084 
00085         
00086         
00087         
00088 
00090 
00091 
00099    public:static void squirrelGlue()
00100         {
00101          ::SqPlus::SQClassDef < Node > (_T("Node")).func(&Node::createProcess,
00102                                                          _T("createProcess")).func(&Node::createBuffer,
00103                                                                                   _T("createBuffer"));
00104         }
00105 
00107 
00108         
00109         
00110         
00111 
00112    public:
00113 
00115         typedef Pointer < Node,
00116         Mutex > Pointer;
00117 
00118         
00119         
00120         
00121 
00123 
00124 
00125    protected:
00126 
00132         Host * mParent;
00133 
00139         PCstring mSearchPath;
00140 
00146         Container < Process, Mutex >::Pointer mProcesses;
00147 
00153         OutputNode::Pointer mOutputDocument;
00154 
00160         Container < Buffer, Mutex >::Pointer mBuffers;
00161 
00167         bool mInitialized;
00168 
00170 
00171         
00172         
00173         
00174 
00176 
00177 
00178    public:
00179 
00183         Node();
00184 
00190         Node(const std::string & name, Host * parent);
00191 
00195         virtual ~ Node();
00196 
00198 
00199         
00200         
00201         
00202 
00204 
00205 
00206    public:
00207 
00213         Host * getParent() const;
00214 
00220         const PCstring & getSearchPath() const;
00221 
00227         Container < Process, Mutex >::Pointer & getProcesses();
00228 
00234         OutputNode::Pointer & getOutputDocument();
00235 
00241         const bool & getInitialized() const;
00242 
00244 
00245         
00246         
00247         
00248 
00250 
00251 
00252    public:
00253 
00257         virtual void initialize();
00258 
00262         virtual void finalize();
00263 
00269         virtual Process *createProcess(const char *processName);
00270 
00281         virtual Buffer *createBuffer(const char *name, const PCuint left, const PCuint top,
00282                                   const PCuint width, const PCuint height,
00283                                   const PCuint depthFormat);
00284 
00290         virtual Buffer::Pointer getBuffer(const std::string name);
00291 
00295         virtual void start();
00296 
00301         virtual u32 stop();
00302 
00306         virtual void collectData();
00307 
00312         virtual void setFrameID(const u32 & frameID);
00313 
00315 
00316   };
00317 
00318   
00319   
00320   
00321 
00322 #  include "PCMNode_impl.h"
00323 
00324 }
00325 
00326 
00328 DECLARE_INSTANCE_TYPE_NAME(ParCompMark::Node, Node);
00329 
00330 #endif