Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing export attributes to SdfLayerDelegate and SdfData #623

Merged
merged 3 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pxr/usd/lib/sdf/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class SdfData : public SdfAbstractData
SDF_API
virtual SdfSpecType GetSpecType(const SdfAbstractDataSpecId& id) const;

SDF_API
virtual bool Has(const SdfAbstractDataSpecId& id, const TfToken &fieldName,
SdfAbstractDataValue* value) const;
SDF_API
Expand Down
30 changes: 28 additions & 2 deletions pxr/usd/lib/sdf/layerStateDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define SDF_LAYER_STATE_DELEGATE_H

#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/usd/sdf/declareHandles.h"
#include "pxr/usd/sdf/types.h"
#include "pxr/base/tf/declarePtrs.h"
Expand Down Expand Up @@ -60,81 +61,106 @@ class SdfLayerStateDelegateBase
, public TfWeakBase
{
public:
SDF_API
sopvop marked this conversation as resolved.
Show resolved Hide resolved
virtual ~SdfLayerStateDelegateBase();

SDF_API
bool IsDirty();

SDF_API
void SetField(
const SdfAbstractDataSpecId& id,
const TfToken& field,
const VtValue& value,
const VtValue *oldValue=NULL);

SDF_API
void SetField(
const SdfAbstractDataSpecId& id,
const TfToken& field,
const SdfAbstractDataConstValue& value,
const VtValue *oldValue=NULL);

SDF_API
void SetFieldDictValueByKey(
const SdfAbstractDataSpecId& id,
const TfToken& field,
const TfToken& keyPath,
const VtValue& value,
const VtValue *oldValue=NULL);

SDF_API
void SetFieldDictValueByKey(
const SdfAbstractDataSpecId& id,
const TfToken& field,
const TfToken& keyPath,
const SdfAbstractDataConstValue& value,
const VtValue *oldValue=NULL);

SDF_API
void SetTimeSample(
const SdfAbstractDataSpecId& id,
double time,
const VtValue& value);

SDF_API
void SetTimeSample(
const SdfAbstractDataSpecId& id,
double time,
const SdfAbstractDataConstValue& value);

SDF_API
void CreateSpec(
const SdfPath& path,
SdfSpecType specType,
bool inert);

SDF_API
void DeleteSpec(
const SdfPath& path,
bool inert);

SDF_API
void MoveSpec(
const SdfPath& oldPath,
const SdfPath& newPath);

SDF_API
void PushChild(
const SdfPath& parentPath,
const TfToken& field,
const TfToken& value);

SDF_API
void PushChild(
const SdfPath& parentPath,
const TfToken& field,
const SdfPath& value);

SDF_API
void PopChild(
const SdfPath& parentPath,
const TfToken& field,
const TfToken& oldValue);

SDF_API
void PopChild(
const SdfPath& parentPath,
const TfToken& field,
const SdfPath& oldValue);

protected:
SDF_API
SdfLayerStateDelegateBase();

/// Returns the layer associated with this state delegate.
/// May be NULL if no layer is associated.
SDF_API
SdfLayerHandle _GetLayer() const;

/// Returns the underlying data object for the layer associated with
/// this state delegate. May be NULL if no layer is associated.
SDF_API
SdfAbstractDataPtr _GetLayerData() const;

/// Returns true if the associated layer has been authored to since
Expand Down Expand Up @@ -192,7 +218,7 @@ class SdfLayerStateDelegateBase
SdfSpecType specType,
bool inert) = 0;

/// Invoked when a spec and its children are deleted from the associated
/// Invoked when a spec and its children are deleted from the associated
/// layer.
virtual void _OnDeleteSpec(
const SdfPath& path,
Expand Down Expand Up @@ -229,7 +255,7 @@ class SdfLayerStateDelegateBase

private:
friend class SdfLayer;
void _SetLayer(const SdfLayerHandle& layer);
SDF_API void _SetLayer(const SdfLayerHandle& layer);

private:
SdfLayerHandle _layer;
Expand Down