CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxUtilities.h
Go to the documentation of this file.
1//*****************************************************************************
2// File : ctxUtilities.h
3// Description : Utilities and nice to have functions
4// Author : Anders Modén
5// Product : CorTeX 2.0.1
6//
7// Copyright © 2015- Anders Modén, Sweden
8//
9// NOTE: CorTeX is a software development kit (SDK)
10// for neural networks and genetic programming.
11// Licensed by Anders Modén.
12//
13//
14// Revision History...
15//
16// Who Date Description
17//
18// AMO 150708 Created file (1.0.0)
19// AMO 261015 Allow automatic process uptime for monitor values (2.0.2)
20//
21//******************************************************************************
22#ifndef __CTX_UTILITIES_H__
23#define __CTX_UTILITIES_H__
24
25#include "ctxBase.h"
26
27class ctxCortexDataMonitor : public gzPerformanceMonitorInterface , public gzReference
28{
29public:
30
31 CTX_EXPORT ctxCortexDataMonitor(gzArgumentParser &arg);
32 CTX_EXPORT ctxCortexDataMonitor(const gzString &arg=GZ_EMPTY_STRING);
33
35
36 CTX_EXPORT virtual gzVoid enter(const gzString &monitor);
37 CTX_EXPORT virtual gzVoid leave(const gzString &monitor);
39 CTX_EXPORT virtual gzVoid addValue(const gzString &monitor,const gzDynamicType &value,const gzDouble &time=-1,const gzUInt32 &instanceID=0);
40
41private:
42
43 gzSerializeAdapterPtr m_adapter;
44};
45
46GZ_DECLARE_REFPTR(ctxCortexDataMonitor);
47
48inline gzUInt32 ctxFloatToUInt32(const gzFloat &val)
49{
50 return *(gzUInt32 *)&val;
51}
52
53inline gzFloat ctxUInt32ToFloat(const gzUInt32 &val)
54{
55 return *(gzFloat *)&val;
56}
57
58CTX_EXPORT gzUInt32 compileTempTokens(gzDynamicArray<gzUInt32> &commands,gzUInt32 command,gzUInt32 sum_count,gzUInt32 steps,gzUInt32 in_id,gzUInt32 shortToken=0);
59
60
61#endif //__CTX_UTILITIES_H__
62
63
64
65
ctxCortexDataMonitor(const gzString &arg=GZ_EMPTY_STRING)
virtual gzVoid enter(const gzString &monitor)
virtual gzVoid leave(const gzString &monitor)
virtual ~ctxCortexDataMonitor()
virtual gzVoid addValue(const gzString &monitor, const gzDynamicType &value, const gzDouble &time=-1, const gzUInt32 &instanceID=0)
Negative time selects process uptime; explicit nonnegative coordinates are preserved.
ctxCortexDataMonitor(gzArgumentParser &arg)
#define CTX_EXPORT
Definition ctxBase.h:68
gzFloat ctxUInt32ToFloat(const gzUInt32 &val)
gzUInt32 compileTempTokens(gzDynamicArray< gzUInt32 > &commands, gzUInt32 command, gzUInt32 sum_count, gzUInt32 steps, gzUInt32 in_id, gzUInt32 shortToken=0)
gzUInt32 ctxFloatToUInt32(const gzFloat &val)