This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fileFormat.h File Reference
+ Include dependency graph for fileFormat.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SdfFileFormat
 Base class for file format implementations. More...
 

Macros

#define SDF_FILE_FORMAT_TOKENS    ((TargetArg, "target"))
 
#define SDF_DEFINE_FILE_FORMAT(FileFormatClass, BaseClass1, ...)
 Performs registrations needed for the specified file format class to be discovered by Sdf.
 
#define SDF_DEFINE_ABSTRACT_FILE_FORMAT(FileFormatClass, BaseClass1, ...)
 Performs registrations needed for the specified abstract file format class.
 
#define SDF_FILE_FORMAT_FACTORY_ACCESS
 Provides access to allow file format classes to be instantiated from Sdf.
 

Functions

 SDF_DECLARE_HANDLES (SdfLayer)
 
 SDF_DECLARE_HANDLES (SdfSpec)
 
 TF_DECLARE_WEAK_AND_REF_PTRS (SdfAbstractData)
 
 TF_DECLARE_WEAK_AND_REF_PTRS (SdfFileFormat)
 
 TF_DECLARE_PUBLIC_TOKENS (SdfFileFormatTokens, SDF_API, SDF_FILE_FORMAT_TOKENS)
 

Macro Definition Documentation

◆ SDF_DEFINE_ABSTRACT_FILE_FORMAT

#define SDF_DEFINE_ABSTRACT_FILE_FORMAT (   FileFormatClass,
  BaseClass1,
  ... 
)

Performs registrations needed for the specified abstract file format class.

This is used to register types that serve as base classes for other concrete file format classes used by Sdf.

The first argument is the name of the file format class being registered. Subsequent arguments list the base classes of the file format. Since all file formats must ultimately derive from SdfFileFormat, there should be at least one base class specified.

For example:

// in MyFileFormat.cpp
{
}
Base class for file format implementations.
Definition: fileFormat.h:50
TfType represents a dynamic runtime type.
Definition: type.h:48
#define SDF_DEFINE_ABSTRACT_FILE_FORMAT(FileFormatClass, BaseClass1,...)
Performs registrations needed for the specified abstract file format class.
Definition: fileFormat.h:597
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

Definition at line 597 of file fileFormat.h.

◆ SDF_DEFINE_FILE_FORMAT

#define SDF_DEFINE_FILE_FORMAT (   FileFormatClass,
  BaseClass1,
  ... 
)

Performs registrations needed for the specified file format class to be discovered by Sdf.

This typically would be invoked in a TF_REGISTRY_FUNCTION in the source file defining the file format.

The first argument is the name of the file format class being registered. Subsequent arguments list the base classes of the file format. Since all file formats must ultimately derive from SdfFileFormat, there should be at least one base class specified.

For example:

// in MyFileFormat.cpp
{
}
#define SDF_DEFINE_FILE_FORMAT(FileFormatClass, BaseClass1,...)
Performs registrations needed for the specified file format class to be discovered by Sdf.
Definition: fileFormat.h:563

Definition at line 563 of file fileFormat.h.

◆ SDF_FILE_FORMAT_FACTORY_ACCESS

#define SDF_FILE_FORMAT_FACTORY_ACCESS

Provides access to allow file format classes to be instantiated from Sdf.

This should be specified in the class definition for concrete file format classes.

For example:

// in MyFileFormat.h
class MyFileFormat : public SdfFileFormat
{
// ...
};
#define SDF_FILE_FORMAT_FACTORY_ACCESS
Provides access to allow file format classes to be instantiated from Sdf.
Definition: fileFormat.h:627

Definition at line 627 of file fileFormat.h.

◆ SDF_FILE_FORMAT_TOKENS

#define SDF_FILE_FORMAT_TOKENS    ((TargetArg, "target"))

Definition at line 38 of file fileFormat.h.