MCPcopy Create free account
hub / github.com/colmap/colmap / ListObjectAttributes

Function ListObjectAttributes

src/pycolmap/helpers.h:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131inline std::vector<std::string> ListObjectAttributes(const py::object& pyself) {
132 std::vector<std::string> attributes;
133 for (const auto& handle : pyself.attr("__dir__")()) {
134 const py::str attribute = py::reinterpret_borrow<py::str>(handle);
135 const auto value = pyself.attr(attribute);
136 if (AttributeIsFunction(attribute, value)) {
137 continue;
138 }
139 attributes.push_back(attribute);
140 }
141 return attributes;
142}
143
144template <typename T, typename... options>
145py::dict ConvertToDict(const T& self,

Callers 1

ConvertToDictFunction · 0.85

Calls 1

AttributeIsFunctionFunction · 0.85

Tested by

no test coverage detected