HDK
|
#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/base/arch/demangle.h"
#include "pxr/base/arch/hints.h"
#include "pxr/base/tf/delegatedCountPtr.h"
#include "pxr/base/tf/diagnostic.h"
#include "pxr/base/tf/weakPtrFacade.h"
#include "pxr/base/tf/declarePtrs.h"
#include <set>
#include <typeinfo>
#include <type_traits>
#include <vector>
Go to the source code of this file.
Classes | |
class | TfRefPtr< T > |
class | SdfHandle< T > |
struct | SdfHandleTo< T > |
struct | SdfHandleTo< SdfLayer > |
struct | Sdf_CastAccess |
struct | Sdf_SpecTypesAreDirectlyRelated< DST, SRC > |
Macros | |
#define | SDF_DECLARE_HANDLES(cls) |
Typedefs | |
using | Sdf_IdentityRefPtr = TfDelegatedCountPtr< Sdf_Identity > |
typedef TfRefPtr< SdfLayer > | SdfLayerRefPtr |
typedef std::vector< TfRefPtr < SdfLayer > > | SdfLayerRefPtrVector |
typedef std::set< SdfHandleTo < SdfLayer >::Handle > | SdfLayerHandleSet |
Functions | |
template<typename T > | |
SdfHandleTo< T >::Handle | SdfCreateHandle (T *p) |
template<> | |
SDF_API SdfHandleTo< SdfLayer > ::Handle | SdfCreateHandle (SdfLayer *p) |
template<typename T > | |
SdfHandleTo< T >::Handle | SdfCreateNonConstHandle (T const *p) |
SDF_API bool | Sdf_CanCastToType (const SdfSpec &srcSpec, const std::type_info &destType) |
SDF_API bool | Sdf_CanCastToTypeCheckSchema (const SdfSpec &srcSpec, const std::type_info &destType) |
template<typename DST , typename SRC > | |
SdfHandle< typename DST::SpecType > | TfDynamic_cast (const SdfHandle< SRC > &x) |
template<typename DST , typename SRC > | |
SdfHandle< typename DST::SpecType > | TfSafeDynamic_cast (const SdfHandle< SRC > &x) |
template<typename DST , typename SRC > | |
SdfHandle< typename DST::SpecType > | TfStatic_cast (const SdfHandle< SRC > &x) |
template<typename T > | |
SdfHandle< typename T::SpecType > | TfConst_cast (const SdfHandle< const typename T::SpecType > &x) |
template<typename DST , typename SRC > | |
SdfHandle< typename DST::SpecType > | SdfSpecDynamic_cast (const SdfHandle< SRC > &x) |
template<typename DST , typename SRC > | |
SdfHandle< typename DST::SpecType > | SdfSpecStatic_cast (const SdfHandle< SRC > &x) |
template<typename DST_SPEC , typename SRC_SPEC > | |
DST_SPEC | SdfSpecStatic_cast (const SRC_SPEC &x) |
Convert SRC_SPEC to a DST_SPEC. More... | |
#define SDF_DECLARE_HANDLES | ( | cls | ) |
Definition at line 328 of file declareHandles.h.
Definition at line 36 of file declareHandles.h.
typedef std::set<SdfHandleTo<SdfLayer>::Handle> SdfLayerHandleSet |
Definition at line 326 of file declareHandles.h.
typedef TfRefPtr<SdfLayer> SdfLayerRefPtr |
Definition at line 324 of file declareHandles.h.
typedef std::vector<TfRefPtr<SdfLayer> > SdfLayerRefPtrVector |
Definition at line 325 of file declareHandles.h.
SDF_API bool Sdf_CanCastToTypeCheckSchema | ( | const SdfSpec & | srcSpec, |
const std::type_info & | destType | ||
) |
SdfHandleTo<T>::Handle SdfCreateHandle | ( | T * | p | ) |
Definition at line 187 of file declareHandles.h.
SDF_API SdfHandleTo<SdfLayer>::Handle SdfCreateHandle | ( | SdfLayer * | p | ) |
SdfHandleTo<T>::Handle SdfCreateNonConstHandle | ( | T const * | p | ) |
Definition at line 198 of file declareHandles.h.
|
inline |
Convert SdfHandle<SRC> x
to an SdfHandle<DST>. This function is similar to TfDynamic_cast, but it allows the SRC and DST spec to be indirectly related, so long as the schema associated with the DST spec type is a subclass of the schema associated with x
.
Definition at line 290 of file declareHandles.h.
|
inline |
Convert SdfHandle<SRC> x
to an SdfHandle<DST>. This function is similar to TfStatic_cast, but it allows the SRC and DST spec to be indirectly related.
Definition at line 308 of file declareHandles.h.
|
inline |
Convert SRC_SPEC to a DST_SPEC.
Definition at line 319 of file declareHandles.h.
|
inline |
Definition at line 278 of file declareHandles.h.
|
inline |
Convert SdfHandle<SRC> x
to an SdfHandle<DST>. This function behaves similar to a dynamic_cast. If class DST cannot represent the spec pointed to be x
, or if the classes DST and SRC are not directly related to each other in the C++ type hierarchy, the conversion fails and an invalid handle is returned.
XXX: The second condition in the above statement is currently untrue. This function will allow casting between spec classes even if they are not directly related. Doing so could lead to schema mismatches and other buggy behavior.
Definition at line 238 of file declareHandles.h.
|
inline |
Definition at line 253 of file declareHandles.h.
|
inline |
Convert SdfHandle<SRC> x
to an SdfHandle<DST>. This function behaves similar to a static_cast. No runtime checks are performed to ensure the conversion is valid; it is up to the consumer to ensure this.
Definition at line 265 of file declareHandles.h.