MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / create

Method create

Engine/source/forest/forestDataFile.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template<>
42void* Resource<ForestData>::create( const Torque::Path &path )
43{
44 FileStream stream;
45 stream.open( path.getFullPath(), Torque::FS::File::Read );
46 if ( stream.getStatus() != Stream::Ok )
47 return NULL;
48
49 ForestData *file = new ForestData();
50 if ( !file->read( stream ) )
51 {
52 delete file;
53 return NULL;
54 }
55
56 return file;
57}
58
59
60U32 ForestData::smNextItemId = 1;

Callers

nothing calls this directly

Calls 3

openMethod · 0.65
getStatusMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected