SdfNamespaceEdit Class Reference

A single namespace edit. More...

Inherits equality_comparable< SdfNamespaceEdit >.

Public Types

typedef SdfNamespaceEdit This
 
typedef SdfPath Path
 
typedef int Index
 

Public Member Functions

 SdfNamespaceEdit ()
 The default edit maps the empty path to the empty path. More...
 
 SdfNamespaceEdit (const Path &currentPath_, const Path &newPath_, Index index_=AtEnd)
 The fully general edit. More...
 
SDF_API bool operator== (const This &rhs) const
 

Static Public Member Functions

static This Remove (const Path &currentPath)
 Returns a namespace edit that removes the object at currentPath. More...
 
static This Rename (const Path &currentPath, const TfToken &name)
 Returns a namespace edit that renames the prim or property at currentPath to name. More...
 
static This Reorder (const Path &currentPath, Index index)
 Returns a namespace edit to reorder the prim or property at currentPath to index index. More...
 
static This Reparent (const Path &currentPath, const Path &newParentPath, Index index)
 Returns a namespace edit to reparent the prim or property at currentPath to be under newParentPath at index index. More...
 
static This ReparentAndRename (const Path &currentPath, const Path &newParentPath, const TfToken &name, Index index)
 Returns a namespace edit to reparent the prim or property at currentPath to be under newParentPath at index index with the name name. More...
 

Public Attributes

Path currentPath
 Path of the object when this edit starts. More...
 
Path newPath
 Path of the object when this edit ends. More...
 
Index index
 Index for prim insertion. More...
 

Static Public Attributes

static const Index AtEnd = -1
 Special index that means at the end. More...
 
static const Index Same = -2
 Special index that means don't move. More...
 

Detailed Description

A single namespace edit.

It supports renaming, reparenting, reparenting with a rename, reordering, and removal.

Definition at line 47 of file namespaceEdit.h.

Constructor & Destructor Documentation

◆ SdfNamespaceEdit() [1/2]

SdfNamespaceEdit ( )
inline

The default edit maps the empty path to the empty path.

Definition at line 62 of file namespaceEdit.h.

◆ SdfNamespaceEdit() [2/2]

SdfNamespaceEdit ( const Path currentPath_,
const Path newPath_,
Index  index_ = AtEnd 
)
inline

The fully general edit.

Definition at line 65 of file namespaceEdit.h.

Member Function Documentation

◆ Remove()

static This Remove ( const Path currentPath)
inlinestatic

Returns a namespace edit that removes the object at currentPath.

Definition at line 70 of file namespaceEdit.h.

◆ Rename()

static This Rename ( const Path currentPath,
const TfToken name 
)
inlinestatic

Returns a namespace edit that renames the prim or property at currentPath to name.

Definition at line 77 of file namespaceEdit.h.

◆ Reorder()

static This Reorder ( const Path currentPath,
Index  index 
)
inlinestatic

Returns a namespace edit to reorder the prim or property at currentPath to index index.

Definition at line 84 of file namespaceEdit.h.

◆ Reparent()

static This Reparent ( const Path currentPath,
const Path newParentPath,
Index  index 
)
inlinestatic

Returns a namespace edit to reparent the prim or property at currentPath to be under newParentPath at index index.

Definition at line 91 of file namespaceEdit.h.

◆ ReparentAndRename()

static This ReparentAndRename ( const Path currentPath,
const Path newParentPath,
const TfToken name,
Index  index 
)
inlinestatic

Returns a namespace edit to reparent the prim or property at currentPath to be under newParentPath at index index with the name name.

Definition at line 104 of file namespaceEdit.h.

Member Data Documentation

◆ AtEnd

const Index AtEnd = -1
static

Special index that means at the end.

Definition at line 55 of file namespaceEdit.h.

◆ currentPath

Path currentPath

Path of the object when this edit starts.

Definition at line 119 of file namespaceEdit.h.

◆ index

Index index

Index for prim insertion.

Definition at line 121 of file namespaceEdit.h.

◆ newPath

Path newPath

Path of the object when this edit ends.

Definition at line 120 of file namespaceEdit.h.

◆ Same

const Index Same = -2
static

Special index that means don't move.

It's only meaningful when renaming. In other cases implementations may assume AtEnd.

Definition at line 59 of file namespaceEdit.h.


The documentation for this class was generated from the following file: