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. More...
 
#define SDF_DEFINE_ABSTRACT_FILE_FORMAT(FileFormatClass, BaseClass1, ...)
 Performs registrations needed for the specified abstract file format class. More...
 
#define SDF_FILE_FORMAT_FACTORY_ACCESS
 Provides access to allow file format classes to be instantiated from Sdf. More...
 

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:

Definition at line 481 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
{
}

Definition at line 447 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
{
// ...
};

Definition at line 511 of file fileFormat.h.