WSF
SupBlock.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing 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 SUPBLOCK_HPP
13#define SUPBLOCK_HPP
14
15#include <map>
16
17class GenI;
18class GenO;
19
21{
22public:
23 SupBlock(unsigned aBlockNumber); // Creates a new block.
24 SupBlock(long* aBlockPtr,
25 unsigned aBlockNumber); // Shares a block.
26 SupBlock();
27 void Initialize();
28 static void ResetState();
29
30 ~SupBlock();
31
32 friend GenO& operator<<(GenO& aOut, const SupBlock& aBlock);
33
34 friend GenI& operator>>(GenI& aIn, SupBlock& aBlock);
35
36 // private:
37 // Allow easy access to representation
38
39 unsigned mBlockNumber;
40 unsigned mSize;
41 union
42 {
44 long* mIntBlock;
46 double* mDoubleBlock;
47 };
48
49 bool mShared;
50
51 static std::map<unsigned, unsigned> mBlockNumberToSizeMap;
52 static bool mInitializeOnce;
53};
54
55// typedefs
56
57#endif
void Initialize()
Definition SupBlock.cpp:48
float * mFloatBlock
Definition SupBlock.hpp:45
unsigned mSize
Definition SupBlock.hpp:40
char * mCharBlock
Definition SupBlock.hpp:43
double * mDoubleBlock
Definition SupBlock.hpp:46
long * mIntBlock
Definition SupBlock.hpp:44
SupBlock()
Definition SupBlock.cpp:24
friend GenI & operator>>(GenI &aIn, SupBlock &aBlock)
Definition SupBlock.cpp:112
~SupBlock()
Definition SupBlock.cpp:94
static std::map< unsigned, unsigned > mBlockNumberToSizeMap
Definition SupBlock.hpp:51
static bool mInitializeOnce
Definition SupBlock.hpp:52
bool mShared
Definition SupBlock.hpp:49
unsigned mBlockNumber
Definition SupBlock.hpp:39
SupBlock(unsigned aBlockNumber)
Definition SupBlock.cpp:69
friend GenO & operator<<(GenO &aOut, const SupBlock &aBlock)
Definition SupBlock.cpp:103
static void ResetState()
Definition SupBlock.cpp:89
Copyrights Multiple, All Rights Reserved