MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / update_attribute

Function update_attribute

nanofi/src/api/nanofi.cpp:386–391  ·  view source on GitHub ↗

* Updates (or adds) an attribute * @param ff flow file record * @param key key * @param value value to add * @param size size of value */

Source from the content-addressed store, hash-verified

384 * @param size size of value
385 */
386void update_attribute(flow_file_record *ff, const char *key, void *value, size_t size) {
387 NULL_CHECK(, ff, key);
388 NULL_CHECK(, ff->attributes);
389 auto attribute_map = static_cast<AttributeMap*>(ff->attributes);
390 (*attribute_map)[key] = std::string(static_cast<char*>(value), size);
391}
392
393/*
394 * Obtains the attribute.

Callers 3

update_attributesFunction · 0.85
CAPITests.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected