CompoundDrawState.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
12 //=======================================================================================
13 // @bsiclass Bentley Systems
14 //=======================================================================================
15 typedef RefCountedPtr <struct CompoundDrawState> CompoundDrawStatePtr;
18 typedef struct CompoundDrawState const* CompoundDrawStateCP;
19 typedef struct CompoundDrawState const& CompoundDrawStateCR;
20 
22 struct CompoundDrawState : RefCountedBase
23 {
24 private:
25  size_t m_drawGeomMethodIndex;
26  bvector<size_t> m_conditionalBlockIndices;
27 
31  CompoundDrawState (size_t drawIndex, bvector<size_t>& conditionalBlockIndices);
32 
33 public:
35  GEOMDLLIMPEXP static CompoundDrawStatePtr Create ();
37  GEOMDLLIMPEXP static CompoundDrawStatePtr Create (size_t drawIndex, bvector<size_t>& conditionalBlockIndices);
39  GEOMDLLIMPEXP static CompoundDrawStatePtr Create (CompoundDrawStateCR rhs);
41  GEOMDLLIMPEXP WString GetDebugString () const;
43  GEOMDLLIMPEXP bool operator == (CompoundDrawStateCR rhs) const;
45  GEOMDLLIMPEXP bool operator < (CompoundDrawStateCR rhs) const;
47  GEOMDLLIMPEXP void Store (bvector <uint16_t>&) const;
49  GEOMDLLIMPEXP void Load (void const* data, size_t dataSize);
51 
52  size_t GetDrawGeomMethodIndex() const { return m_drawGeomMethodIndex; }
54  bvector<size_t> const& GetConditionalBlockIndices () const { return m_conditionalBlockIndices; }
55  bvector<size_t>& GetConditionalBlockIndicesR() { return m_conditionalBlockIndices; }
57  void SetDrawGeomMethodIndex(size_t index) { m_drawGeomMethodIndex = index; }
58 
59 }; // CompoundDrawState
60 
61 
62 
struct CompoundDrawState const * CompoundDrawStateCP
Definition: CompoundDrawState.h:18
RefCountedPtr< struct CompoundDrawState > CompoundDrawStatePtr
Definition: CompoundDrawState.h:15
struct CompoundDrawState * CompoundDrawStateP
Definition: CompoundDrawState.h:16
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
RefCounted object carrying a draw method index and variable size array of size_t. ...
Definition: CompoundDrawState.h:22
static CompoundDrawStatePtr Create()
Allocate with empty data.
size_t GetDrawGeomMethodIndex() const
Return the draw index.
Definition: CompoundDrawState.h:52
void Load(void const *data, size_t dataSize)
Copy data from the caller's memor into this CompoundDrawState.
bvector< size_t > & GetConditionalBlockIndicesR()
Definition: CompoundDrawState.h:55
bvector< size_t > const & GetConditionalBlockIndices() const
return (reference to) the stored block indices.
Definition: CompoundDrawState.h:54
struct CompoundDrawState & CompoundDrawStateR
Definition: CompoundDrawState.h:17
WString GetDebugString() const
Return debug representation.
struct CompoundDrawState const & CompoundDrawStateCR
Definition: CompoundDrawState.h:19
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
bool operator==(CompoundDrawStateCR rhs) const
complete equality test
void Store(bvector< uint16_t > &) const
copy all data into the caller's bvector.
bool operator<(CompoundDrawStateCR rhs) const
lexical comparison, draw index then vector data.
void SetDrawGeomMethodIndex(size_t index)
set the drawGeom index.
Definition: CompoundDrawState.h:57

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.