Rhino C++ API
8.10
|
#include <IRhRdkContents.h>
Public Member Functions | |
virtual bool | Attach (CRhRdkContent &c)=0 |
virtual IRhRdkContents & | BeginChange (RhRdkChangeContext cc) const =0 |
virtual RDK_DEPRECATED bool | Change (const CRhRdkContent &oldContent, CRhRdkContent &newContent, bool bPreserve=true)=0 |
virtual CRhRdkContent * | Detach (const CRhRdkContent &c)=0 |
virtual bool | EndChange (void)=0 |
virtual void * | EVF (const wchar_t *wszFunc, void *pvData)=0 |
virtual void | Find (const CRhRdkContentKindList &kinds, const wchar_t *wszName, bool bCaseSensitive, bool bRecurse, OUT CRhRdkContentArray &aContent) const =0 |
virtual const CRhRdkContent * | Find (const UUID &uuidInstance) const =0 |
virtual const CRhRdkContent * | FindSimilar (const CRhRdkContent &c) const =0 |
virtual bool | IsFilteredOut (const CRhRdkContent &c) const =0 |
virtual class IRhRdkContentIterator * | NewIterator (const CRhRdkContentKindList &kinds, unsigned int it_Flags) const =0 |
bool | Replace (const CRhRdkContent &oldContent, CRhRdkContent &newContent, bool bPreserve=true) |
bool | SelectContent (const CRhRdkInstanceIdArray &aInstance, bool bAppendToSelection) const |
virtual void | UpdateDocumentTables (void) const =0 |
Protected Member Functions | |
virtual | ~IRhRdkContents () |
This is the interface to document contents.
|
inlineprotectedvirtual |
|
pure virtual |
Attach a content to the associated document.
c | is the content to attach. If successful, ownership of the content will be transferred to the document. |
|
pure virtual |
Call this method to get a non-const object upon which you can call non-const methods. Calls to this method are counted; you must call EndChange() once for every call to BeginChange(). Please do not use const_cast or any other means of circumventing this requirement.
|
pure virtual |
Replace a content in the document. Deprecated in favor of Replace().
|
pure virtual |
Detach a content from the document.
c | is the content to detach. If successful, ownership of the content will be transferred to the caller. |
|
pure virtual |
|
pure virtual |
Emergency virtual function for future expansion.
|
pure virtual |
Searches for contents with a particular instance name.
kinds | specifies which top-level content kinds should be searched. |
wszName | is the name to search for. |
bCaseSensitive | specifies if the name check is case-sensitive or not. |
bRecurse | specifies if children of top-level contents should be searched. |
aContent | accepts all the contents that satisfy the search. If you want to modify these contents you will need to call BeginChange() to get a non-const reference. |
|
pure virtual |
Find a content by its instance id. All document-registered contents (including children) will be checked.
uuidInstance | is the instance id of the content to find. |
|
pure virtual |
Searches for a content with the same name and appearance as another content.
c | is the content to match against. |
|
pure virtual |
|
pure virtual |
Get a new content iterator. The caller shall delete the iterator after use.
kinds | specifies the content kinds to return. |
it_Flags | specifies flags (see CRhRdkDocument::NewContentIterator). |
bool IRhRdkContents::Replace | ( | const CRhRdkContent & | oldContent, |
CRhRdkContent & | newContent, | ||
bool | bPreserve = true |
||
) |
Replace a content in the document.
oldContent | is the content to detach and delete. |
newContent | is the content to attach in place of oldContent. If successful, the old content will be deleted and ownership of the new content will be transferred to the document. |
bPreserve | determines whether or not the instance id and notes are preserved. If true, the instance id of the old content is preserved in the new content. This means that any objects or layers that were referencing the old content will reference the new content. The same applies to the ground plane. The content's notes are also preserved. TODO: The name preserving is currently being reconsidered. [ANDY] |
bool IRhRdkContents::SelectContent | ( | const CRhRdkInstanceIdArray & | aInstance, |
bool | bAppendToSelection | ||
) | const |
Selects contents in all capable editors that are displaying those contents on behalf of the document.
aInstance | is the array of instance-ids of contents to select. |
bAppendToSelection | specifies if the selection should be replaced (false) or modified (true). |
|
pure virtual |
Calls UpdateDocumentTables() on all of the contents.