24 #ifndef SD_MENVA_FILE_FORMAT_H
25 #define SD_MENVA_FILE_FORMAT_H
30 #include "pxr/usd/sdf/api.h"
31 #include "pxr/usd/sdf/declareHandles.h"
32 #include "pxr/usd/sdf/fileFormat.h"
33 #include "pxr/base/tf/staticTokens.h"
38 PXR_NAMESPACE_OPEN_SCOPE
40 #define SDF_TEXT_FILE_FORMAT_TOKENS \
42 ((Version, "1.4.32")) \
46 SDF_API, SDF_TEXT_FILE_FORMAT_TOKENS);
68 const std::string& comment = std::string())
const;
76 std::ostream& ostr)
const;
80 virtual bool CanRead(
const std::string &file)
const override;
85 const std::string& resolvedPath,
86 bool metadataOnly)
const override;
91 const std::string& filePath,
92 const std::string& comment = std::string(),
98 const std::string& str)
const override;
104 const std::string& comment = std::string())
const override;
108 const SdfSpecHandle &spec,
110 size_t indent)
const override;
113 SDF_FILE_FORMAT_FACTORY_ACCESS;
136 SDF_API
virtual bool _ShouldSkipAnonymousReload()
const override;
139 PXR_NAMESPACE_CLOSE_SCOPE
141 #endif // SDF_TEXT_FILE_FORMAT_H
A unit of scene description that you combine with other units of scene description to form a shot...
SDF_API SdfTextFileFormat()
Constructor.
virtual SDF_API bool CanRead(const std::string &file) const override
Returns true if file can be read by this format.
Base class for all Sdf spec classes.
virtual SDF_API bool WriteToFile(const SdfLayer &layer, const std::string &filePath, const std::string &comment=std::string(), const FileFormatArguments &args=FileFormatArguments()) const override
Writes the content in layer into the file at filePath.
virtual SDF_API ~SdfTextFileFormat()
Destructor.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
SDF_API bool WriteToStream(const SdfLayer &layer, std::ostream &ostr) const
Writes the content in layer into the stream ostr.
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
virtual SDF_API bool Read(SdfLayer *layer, const std::string &resolvedPath, bool metadataOnly) const override
Reads scene description from the asset specified by resolvedPath into the layer layer.
SDF_API bool Write(const SdfLayer &layer, std::ostream &ostr, const std::string &comment=std::string()) const
Writes the content of the layer layer to the stream ostr.
virtual SDF_API bool WriteToString(const SdfLayer &layer, std::string *str, const std::string &comment=std::string()) const override
Writes the content in layer to the string str.
virtual SDF_API bool ReadFromString(SdfLayer *layer, const std::string &str) const override
Reads data in the string str into the layer layer.