WSF
WsfPProxyStructHeader.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2016 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFPPROXYSTRUCTHEADER_HPP
13#define WSFPPROXYSTRUCTHEADER_HPP
14
15#include "wsf_parser_export.h"
16
17#include "WsfPProxyPath.hpp"
19
21{
22public:
24 {
25 cSF_POINTER_FMT = 1, // if set, the data format consists of a single pointer to the rest of the struct data
28 cSF_UNSET = 4, // if set, the struct is in an 'unset' state
29 cSF_INHERITED = 8, // if set, the struct's value is inherited
31 };
32
33 const static unsigned int cSF_INSTANTIATION_MASK = cSF_UNSET;
34
35 // Struct flags
37
38#ifdef WSF_PARSE_DEBUG_MEMORY
39 size_t mInstanceMemoryTraceId;
40#endif
41 // This points to the start of the struct's data
43 // Both inline and non-inline formats always have these two fields:
45 // Path to the base struct, indicates inheritance when set.
47
48 // add a path to 'this'
49
50 void* GetStart() { return mStructDataPtr; }
51
52#ifndef NDEBUG
54 {
57#ifdef WSF_PARSE_DEBUG_MEMORY
58 mInstanceMemoryTraceId = UtMemoryDebug::AddDetailTrace(cMDB_PROXY_STRUCT);
59#endif
60 }
62 {
65#ifdef WSF_PARSE_DEBUG_MEMORY
66 UtMemoryDebug::RemoveDetailTrace(cMDB_PROXY_STRUCT, mInstanceMemoryTraceId);
67 mInstanceMemoryTraceId = 0;
68#endif
69 }
70#else
71 void Constructing() {}
72 void Destroying() {}
73#endif
74
76};
77
78#endif
@ cMDB_PROXY_STRUCT
Definition WsfParseDebugMarkers.hpp:19
Represents a path or unique key to a value in the proxy.
Definition WsfPProxyPath.hpp:64
Definition WsfPProxyStructType.hpp:33
Definition WsfPProxyStructHeader.hpp:21
void * mStructDataPtr
Definition WsfPProxyStructHeader.hpp:42
static const unsigned int cSF_INSTANTIATION_MASK
Definition WsfPProxyStructHeader.hpp:33
void Destroying()
Definition WsfPProxyStructHeader.hpp:61
void * GetStart()
Definition WsfPProxyStructHeader.hpp:50
void Constructing()
Definition WsfPProxyStructHeader.hpp:53
WsfPProxyPath & GetBasePath()
Definition WsfPProxyStructHeader.hpp:75
const WsfPProxyStructType * mStructPtr
Definition WsfPProxyStructHeader.hpp:44
StructFlags
Definition WsfPProxyStructHeader.hpp:24
@ cSF_EXPANDED_FMT
Definition WsfPProxyStructHeader.hpp:26
@ cSF_INHERITED
Definition WsfPProxyStructHeader.hpp:29
@ cSF_CONSTRUCTED
Definition WsfPProxyStructHeader.hpp:30
@ cSF_UNSET
Definition WsfPProxyStructHeader.hpp:28
@ cSF_POINTER_FMT
Definition WsfPProxyStructHeader.hpp:25
@ cSF_HEADER_TYPE_MASK
Definition WsfPProxyStructHeader.hpp:27
int mStructFlags
Definition WsfPProxyStructHeader.hpp:36
WsfPProxyPath mBasePath
Definition WsfPProxyStructHeader.hpp:46
Copyrights Multiple, All Rights Reserved