HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_AttributeFile Class Reference

#include <PDG_AttributeArray.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 memory usage of the attribute and its data. More...
 
PDG_AttributeDataclone () const override
 Deep copies this attribute. More...
 
bool saveData (UT_JSONWriter &writer) const override
 Serializes the data to a JSON writer. More...
 
bool loadData (const UT_JSONValue &value) override
 Loads data from a JSON value. More...
 
bool clearExpected ()
 
void clearMatching (const PDG_File::Set &file_set)
 
const DataappendValue (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 DataappendValue (const Data &, bool replace_expected)
 
void values (Array &values, QueryType query=eQueryReal) const
 
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_Filevalue (int component) const
 
PDG_Filevalue (int component)
 
void setValue (const PDG_File::Array &data)
 
void setValue (const PDG_File::Array &&data)
 
void setValue (const PDG_File &value, int component)
 
const PDG_FileappendValue (const PDG_File &value)
 
const PDG_File::Arrayvalues () const
 
PDG_File::Arrayvalues ()
 
void clear ()
 
void truncate (int length)
 
bool concat (const Self *other)
 
bool adjustSize (int offset)
 
bool hash (SYS_HashType &hash_value, UT_WorkBuffer &errors) const override
 Return a hash value derived from the attribute data. More...
 
void swap (Self *other)
 
void copy (const Self *other)
 
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...
 
- Public Member Functions inherited from PDG_AttributeData
 PDG_AttributeData ()
 
virtual ~PDG_AttributeData ()
 

Additional Inherited Members

- Static Public Member Functions inherited from PDG_AttributeData
static PDG_AttributeDatafromType (PDG_AttributeType type)
 
static PDG_EventType eventType (PDG_AttributeType type)
 Static utility for returnign an event from type from an attribute type. More...
 
static PDG_AttributeType typeFromString (const UT_StringHolder &type_name)
 Returns an attribute type enum from the specified string name. More...
 
static PDG_AttributeIntrinsic intrinsicFromName (const UT_StringRef &name)
 Returns an intrinsic type from an attribue name. More...
 
static UT_StringHolder nameFromIntrinsic (PDG_AttributeIntrinsic attrib_type, const UT_StringHolder &name)
 Returns an attribute name from a intrinsic type a name string. More...
 
static bool validName (const UT_StringHolder &str, bool allow_internal=false)
 
static bool makeValidName (UT_StringHolder &name, const UT_StringHolder &str, bool allow_internal=false)
 
static UT_StringHolder typeName (PDG_AttributeType type)
 Returns the string name for the specififed attribute type. More...
 
static UT_StringHolder mergeName (PDG_AttributeMergeOp merge)
 Returns the string name for the specified merge op. More...
 
- Static Public Attributes inherited from PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array >
static constexpr PDG_AttributeType TypeEnum
 
- Static Public Attributes inherited from PDG_AttributeData
static constexpr PDG_AttributeType TypeEnum = PDG_AttributeType::eUndefined
 Attribute data version number. More...
 
static const UT_StringHolder theFlagKey
 
static const UT_StringHolder theTypeKey
 
static const UT_StringHolder theRuntimeKey
 
static const UT_StringHolder theConcatKey
 
static const UT_StringHolder theOwnKey
 
static const UT_StringHolder theValueKey
 
- Protected Member Functions inherited from PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array >
void expand (const PDG_File &value, int component)
 
- Static Protected Member Functions inherited from PDG_AttributeData
static PDG_AttributeMergeError merge (UT_StringArray &data, PDG_AttributeMergeOp merge_op, int stride)
 Merge op utility for string array data. More...
 
static PDG_AttributeMergeError merge (PDG_File::Array &data, PDG_AttributeMergeOp merge_op, int stride)
 Merge op utility for file array data. More...
 
static PDG_AttributeMergeError merge (UT_ValArray< fpreal > &data, PDG_AttributeMergeOp merge_op, int stride)
 Merge op utility for float array data. More...
 
static PDG_AttributeMergeError merge (UT_ValArray< exint > &data, PDG_AttributeMergeOp merge_op, int stride)
 Merge op utility for int array data. More...
 
- Protected Attributes inherited from PDG_AttributeArray< PDG_AttributeType::eFileArray, PDG_File, PDG_File::Array >
PDG_File::Array myData
 

Detailed Description

Result data array attribute type

Definition at line 281 of file PDG_AttributeArray.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
eQueryAny 
eQueryReal 
eQueryExpected 

Definition at line 294 of file PDG_AttributeArray.h.

Constructor & Destructor Documentation

PDG_AttributeFile::~PDG_AttributeFile ( )
override

Member Function Documentation

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 
)
const Data& PDG_AttributeFile::appendValue ( const Data ,
bool  replace_expected 
)
bool PDG_AttributeFile::clearExpected ( )
void PDG_AttributeFile::clearMatching ( const PDG_File::Set file_set)
PDG_AttributeData* PDG_AttributeFile::clone ( ) const
overridevirtual

Deep copies this attribute.

Implements PDG_AttributeData.

int64 PDG_AttributeFile::getMemoryUsage ( bool  inclusive) const
overridevirtual

Returns the memory usage of the attribute and its data.

Implements PDG_AttributeData.

bool PDG_AttributeFile::loadData ( const UT_JSONValue )
overridevirtual

Loads data from a JSON value.

Implements PDG_AttributeData.

bool PDG_AttributeFile::saveData ( UT_JSONWriter ) const
overridevirtual

Serializes the data to a JSON writer.

Implements PDG_AttributeData.

PDG_AttributeCast PDG_AttributeFile::valueForTag ( Data value,
int  index,
const UT_StringHolder tag,
QueryType  query = eQueryReal 
) const
void PDG_AttributeFile::values ( Array values,
QueryType  query = eQueryReal 
) const
PDG_AttributeCast PDG_AttributeFile::valuesForEvaluator ( UT_WorkBuffer buffer,
const PDG_AttributeEvaluator evaluator,
QueryType  query = eQueryReal 
) const
void PDG_AttributeFile::valuesForTag ( Array values,
const UT_StringHolder tag,
QueryType  query = eQueryReal 
) const

The documentation for this class was generated from the following file: