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

Method CreateObject

src/fs/fsdatasourceiter.cpp:127–149  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// CreateObject -- creates the named object and fills out its properties appropriately. Returns NULL if any errors occur and fills up the error queue. This does not create the object if dev > 0 and the object's mDev is not equal to it (thus preventing the crossing of file systems) TODO -- in the future, this should become so

Source from the content-addressed store, hash-verified

125// that we don't have to get all the stats() we don't need to.
126///////////////////////////////////////////////////////////////////////////////
127iFCO* cFSDataSourceIter::CreateObject(const cFCOName& name, bool bCreatePeers)
128{
129 cFSObject* pNewObj = new cFSObject(name);
130
131 if (!bCreatePeers)
132 {
133 // when bCreatePeers is false, it means we should set mDev to the
134 // device number of the current object (ie -- it is a new "start point")
135 // If we don't do this here, InitializeTypeInfo() will reject creating the
136 // node.
137 // -- 9 June 99 mdb
138 //
139 mDev = 0;
140 if (!InitializeTypeInfo(pNewObj))
141 {
142 pNewObj->Release();
143 return 0;
144 }
145 mDev = pNewObj->GetFSPropSet().GetDev();
146 }
147
148 return pNewObj;
149}
150
151void cFSDataSourceIter::GetChildrenNames(const TSTRING& strParentName, std::vector<TSTRING>& vChildrenNames)
152{

Callers

nothing calls this directly

Calls 1

ReleaseMethod · 0.45

Tested by

no test coverage detected