|
HDK
|
#include <PDG_AttributeFile.h>
Inheritance diagram for PDG_AttributeFile:Public Types | |
| enum | QueryType { eQueryAny, eQueryReal, eQueryExpected } |
| using | Base = PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array > |
Public Types inherited from PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array > | |
| using | Self = PDG_AttributeArray< AttribType, PDG_File, PDG_File::Array > |
| using | Data = PDG_File |
| using | Array = PDG_File::Array |
| using | Map = UT_StringMap< PDG_File::Array > |
Public Member Functions | |
| ~PDG_AttributeFile () override | |
| int64 | getMemoryUsage (bool inclusive) const override |
| Returns the total memory usage of all data on this attribute. More... | |
| PDG_AttributeData * | clone () const override |
| bool | saveData (UT_JSONWriter &writer) const override |
| void | saveData (const UT_StringHolder &key, UT_OptionsHolder &dict) const override |
| bool | loadData (const UT_JSONValue &value) override |
| bool | loadData (const UT_StringHolder &key, const UT_OptionsHolder &dict) override |
| Reads the file data from the dict. More... | |
| bool | clearExpected () |
| Removes all expected files from the array. More... | |
| void | clearMatching (const PDG_File::Set &file_set) |
| Removes all files that match the input filter set. More... | |
| const Data & | appendValue (const PDG_WorkItem *work_item, const UT_StringHolder &path, const UT_StringHolder &tag, PDG_File::Hash hash, PDG_File::FileType file_type, bool own, bool replace_expected) |
| const Data & | appendValue (const Data &, bool replace_expected) |
| void | values (Array &values, QueryType query=eQueryReal) const |
| Returns all file paths that match the query type. More... | |
| void | valuesForTag (Array &values, const UT_StringHolder &tag, QueryType query=eQueryReal) const |
| PDG_AttributeCast | valueForTag (Data &value, int index, const UT_StringHolder &tag, QueryType query=eQueryReal) const |
| PDG_AttributeCast | valuesForEvaluator (UT_WorkBuffer &buffer, const PDG_AttributeEvaluator &evaluator, QueryType query=eQueryReal) const |
Public Member Functions inherited from PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array > | |
| PDG_AttributeArray () | |
| PDG_AttributeArray (const PDG_File::Array &data) | |
| ~PDG_AttributeArray () override | |
| bool | hasData () const |
| int | size () const |
| bool | valid (int component) const |
| bool | value (PDG_File &data, int component) const |
| const PDG_File & | value (int component) const |
| PDG_File & | value (int component) |
| void | setValue (const PDG_File::Array &data) |
| void | setValue (const PDG_File::Array &&data) |
| void | setValue (const PDG_File &value, int component) |
| void | setValues (const PDG_File::Array &data) |
| const PDG_File & | appendValue (const PDG_File &value) |
| const PDG_File::Array & | values () const |
| PDG_File::Array & | values () |
| void | clear () |
| void | truncate (int length) |
| bool | concat (const Self *other) |
| bool | adjustSize (int offset) |
| bool | setSize (int size) |
| bool | hash (SYS_HashType &hash_value, exint index, UT_WorkBuffer &errors) const override |
| Return a hash value derived from the attribute data. More... | |
| void | swap (Self *other) |
| void | copy (const Self *other, PDG_AttributeCopyOp copy_op) |
| void | copy (const PDG_File::Array &data, PDG_AttributeCopyOp copy_op) |
| bool | compare (const PDG_AttributeData *other) const override |
| Compares this data object with another data object. More... | |
| PDG_AttributeMergeError | merge (PDG_AttributeMergeOp merge_op, int stride) override |
| Applies a merge op to the data in this attribute. More... | |
| bool | slice (PDG_File::Array &result, exint start, UT_Optional< exint > end_opt=UT_Optional< exint >(), UT_Optional< exint > step_opt=UT_Optional< exint >()) const |
Public Member Functions inherited from PDG_AttributeData | |
| PDG_AttributeData () | |
| virtual | ~PDG_AttributeData () |
File array attribute type
Definition at line 27 of file PDG_AttributeFile.h.
| using PDG_AttributeFile::Base = PDG_AttributeArray<PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array> |
Definition at line 35 of file PDG_AttributeFile.h.
Enumeration of different file types that can be queried from the attribute
Definition at line 42 of file PDG_AttributeFile.h.
|
override |
| const Data& PDG_AttributeFile::appendValue | ( | const PDG_WorkItem * | work_item, |
| const UT_StringHolder & | path, | ||
| const UT_StringHolder & | tag, | ||
| PDG_File::Hash | hash, | ||
| PDG_File::FileType | file_type, | ||
| bool | own, | ||
| bool | replace_expected | ||
| ) |
Appends a file to the array, given the specified work item, path, file tag, hash, file type, owernship flag. Optionally replaces any matching expected outputs if they're found in the array
Appends a file to the array using a reference to a file object. Optionally replaces any expected outputs if they're found in the array
| bool PDG_AttributeFile::clearExpected | ( | ) |
Removes all expected files from the array.
| void PDG_AttributeFile::clearMatching | ( | const PDG_File::Set & | file_set | ) |
Removes all files that match the input filter set.
|
overridevirtual |
Constructs a new file attribute that copies the data from this attribute
Implements PDG_AttributeData.
|
overridevirtual |
Returns the total memory usage of all data on this attribute.
Implements PDG_AttributeData.
|
overridevirtual |
Reads the file data from the json value, using the deserialization logic on PDG_File itself
Implements PDG_AttributeData.
|
overridevirtual |
Reads the file data from the dict.
Implements PDG_AttributeData.
|
overridevirtual |
Writes the file data to the json writer, using the JSON serialization logic from PDG_File itself
Implements PDG_AttributeData.
|
overridevirtual |
Writes the file data to the UT_OptionsHolder, using the serialization logic from PDG_File itself
Implements PDG_AttributeData.
| PDG_AttributeCast PDG_AttributeFile::valueForTag | ( | Data & | value, |
| int | index, | ||
| const UT_StringHolder & | tag, | ||
| QueryType | query = eQueryReal |
||
| ) | const |
Returns the first matching file, starting from the specified index, that has the requested tag and type
| void PDG_AttributeFile::values | ( | Array & | values, |
| QueryType | query = eQueryReal |
||
| ) | const |
Returns all file paths that match the query type.
| PDG_AttributeCast PDG_AttributeFile::valuesForEvaluator | ( | UT_WorkBuffer & | buffer, |
| const PDG_AttributeEvaluator & | evaluator, | ||
| QueryType | query = eQueryReal |
||
| ) | const |
Returns all file values using the configuration of the attribute evaluator object, filtered by the query type
| void PDG_AttributeFile::valuesForTag | ( | Array & | values, |
| const UT_StringHolder & | tag, | ||
| QueryType | query = eQueryReal |
||
| ) | const |
Returns all file paths with the specified tag that match the query type