MCPcopy Create free account
hub / github.com/axmolengine/axmol / clone

Method clone

core/base/Properties.cpp:1062–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060}
1061
1062Properties* Properties::clone()
1063{
1064 Properties* p = new Properties();
1065
1066 p->_namespace = _namespace;
1067 p->_id = _id;
1068 p->_parentID = _parentID;
1069 p->_properties = _properties;
1070 p->_propertiesItr = p->_properties.end();
1071 p->setDirectoryPath(_dirPath);
1072
1073 for (size_t i = 0, count = _namespaces.size(); i < count; i++)
1074 {
1075 AXASSERT(_namespaces[i], "Invalid namespace");
1076 Properties* child = _namespaces[i]->clone();
1077 p->_namespaces.emplace_back(child);
1078 child->_parent = p;
1079 }
1080 p->_namespacesItr = p->_namespaces.end();
1081
1082 return p;
1083}
1084
1085void Properties::setDirectoryPath(const std::string* path)
1086{

Callers 1

createNonRefCountedMethod · 0.45

Calls 4

setDirectoryPathMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected