BVB Source Codes

CRYENGINE Show FlowInspectorDefault.h Source code

Return Download CRYENGINE: download FlowInspectorDefault.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   FlowInspectorDefault.h
  5. //  Version:     v1.00
  6. //  Created:     1/12/2005 by AlexL
  7. //  Compilers:   Visual Studio.NET 2003
  8. //  Description: A FlowGraph inspector which draws information of all
  9. //               flowgraphs as 2D overlay
  10. // -------------------------------------------------------------------------
  11. //  History:
  12. //
  13. ////////////////////////////////////////////////////////////////////////////
  14.  
  15. #ifndef __FLOWINSPECTORDEFAULT_H__
  16. #define __FLOWINSPECTORDEFAULT_H__
  17.  
  18. #include <CryFlowGraph/IFlowSystem.h>
  19.  
  20. class CFlowInspectorDefault : public IFlowGraphInspector
  21. {
  22. public:
  23.         CFlowInspectorDefault(IFlowSystem* pFlowSystem);
  24.         virtual ~CFlowInspectorDefault();
  25.  
  26.         // IFlowGraphInspector interface
  27.         virtual void AddRef();
  28.         virtual void Release();
  29.         virtual void PreUpdate(IFlowGraph* pGraph);    // called once per frame before IFlowSystem::Update
  30.         virtual void PostUpdate(IFlowGraph* pGraph);   // called once per frame after  IFlowSystem::Update
  31.         virtual void NotifyFlow(IFlowGraph* pGraph, const SFlowAddress from, const SFlowAddress to);
  32.         virtual void NotifyProcessEvent(IFlowNode::EFlowEvent event, IFlowNode::SActivationInfo* pActInfo, IFlowNode* pImpl);
  33.         virtual void AddFilter(IFlowGraphInspector::IFilterPtr pFilter);
  34.         virtual void RemoveFilter(IFlowGraphInspector::IFilterPtr pFilter);
  35.         virtual void GetMemoryUsage(ICrySizer* s) const;
  36.         // ~IFlowGraphInspector interface
  37.  
  38.         enum ERecType
  39.         {
  40.                 eRTUnknown,
  41.                 eRTEntity,
  42.                 eRTAction,
  43.                 eRTLast
  44.         };
  45.  
  46.         struct TFlowRecord
  47.         {
  48.                 IFlowGraph*    m_pGraph;         // only valid during NotifyFlow, afterwards DON'T de-reference!
  49.                 SFlowAddress   m_from;
  50.                 SFlowAddress   m_to;
  51.                 TFlowInputData m_data;
  52.                 CTimeValue     m_tstamp;
  53.                 ERecType       m_type;
  54.                 string         m_message;        // complete message with graph, action, nodes, ports, value
  55.  
  56.                 bool operator==(const TFlowRecord& lhs) const { const TFlowRecord& rhs = *this; return lhs.m_from == rhs.m_from && lhs.m_to == rhs.m_to && lhs.m_pGraph == rhs.m_pGraph; }
  57.                 bool operator!=(const TFlowRecord& rc) const  { return !(*this == rc); }
  58.  
  59.                 void GetMemoryUsage(ICrySizer* pSizer) const  {}
  60.         };
  61.  
  62. protected:
  63.         virtual void UpdateRecords();
  64.         virtual void DrawRecords(const std::deque<TFlowRecord>& inRecords, int inBaseRow, float inMaxAge) const;
  65.         void         DrawLabel(float col, float row, const ColorF& color, float glow, const char* szText, float fScale = 1.0f) const;
  66.         // return true if flow should be recorded, false otherwise
  67.         bool         RunFilters(IFlowGraph* pGraph, const SFlowAddress from, const SFlowAddress to);
  68.  
  69.         IRenderer*               m_pRenderer;
  70.         IFlowSystem*             m_pFlowSystem;
  71.         int                      m_refs;
  72.         int                      m_newOneTime;
  73.         int                      m_newCont;
  74.         std::vector<TFlowRecord> m_curRecords;
  75.         std::deque<TFlowRecord>  m_oneTimeRecords; // all records which occurred once updated every frame
  76.         std::deque<TFlowRecord>  m_contRecords;    // records which already occurred are put into here
  77.         IFilter_AutoArray        m_filters;
  78.         CTimeValue               m_currentTime;
  79.         bool                     m_bProcessing;
  80.         bool                     m_bPaused;
  81. };
  82.  
  83. #endif
  84.  
downloadFlowInspectorDefault.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top