MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / CopyProps

Method CopyProps

src/fs/fspropset.cpp:115–138  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// CopyProps //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

113// CopyProps
114///////////////////////////////////////////////////////////////////////////////
115void cFSPropSet::CopyProps(const iFCOPropSet* pSrc, const cFCOPropVector& propsToCopy)
116{
117 ASSERT(pSrc->GetType() == CLASS_TYPE(cFSPropSet));
118
119 // first, modify my valid vector...
120 mValidProps |= propsToCopy;
121
122 for (int i = 0; i < GetNumFSProps(); i++)
123 {
124 if (propsToCopy.ContainsItem(i))
125 {
126 ASSERT(pSrc->GetValidVector().ContainsItem(i));
127 const iFCOProp* pProp = pSrc->GetPropAt(i);
128
129 if (pProp->GetType() != cFCOUndefinedProp::GetInstance()->GetType())
130 {
131 GetPropAt(i)->Copy(pProp);
132 mUndefinedProps.RemoveItem(i);
133 }
134 else
135 mUndefinedProps.AddItem(i);
136 }
137 }
138}
139
140
141///////////////////////////////////////////////////////////////////////////////

Callers 2

ProcessChangedFCOMethod · 0.80
ExecuteMethod · 0.80

Calls 5

ContainsItemMethod · 0.80
GetPropAtMethod · 0.80
CopyMethod · 0.45
RemoveItemMethod · 0.45
AddItemMethod · 0.45

Tested by

no test coverage detected