!DgnTextSnippet is a named serialized textblock which is stored in the dictionary model. More...
#include <DgnTextSnippet.h>
Public Types | |
enum | DgnTextSnippetProperty { SnippetName = 1, SnippetText = 2, FromActiveFile = 3, SnippetCategory = 4, SnippetDisplayName = 5, PROPERTY_COUNT } |
typedef DgnTextSnippetPropertyMaskPtr | PropertyMaskPtr |
Static Public Member Functions | |
static DGNPLATFORM_EXPORT DgnTextSnippetPtr | Create (WCharCP name, DgnFileR file) |
Create an in memory representation of any empty snippet with respect to the given file. More... | |
static DGNPLATFORM_EXPORT BentleyStatus | Delete (WCharCP name, DgnFileR file) |
Deletes a DgnTextSnippet from the snippet file. More... | |
static DGNPLATFORM_EXPORT DgnTextSnippetPtr | GetByName (WCharCP name, DgnFileR file) |
Looks up the snippet from the given file. More... | |
static DGNPLATFORM_EXPORT DgnTextSnippetPtr | GetByID (ElementId id, DgnFileR file) |
Looks up the snippet from the given file. More... | |
static DGNPLATFORM_EXPORT void | UpgradeSchemaAndInstance (DgnFileP file) |
Additional Inherited Members | |
![]() | |
virtual | ~RefCounted () |
![]() | |
virtual | ~IRefCounted () |
void * | operator new (size_t size) |
void | operator delete (void *rawMemory, size_t size) |
!DgnTextSnippet is a named serialized textblock which is stored in the dictionary model.
!The DgnTextSnippet class provides API to Get them by their name or ID and basic create, delete, update !operations. !
DGNPLATFORM_EXPORT BentleyStatus Add | ( | DgnFileP | file = NULL | ) |
Creates a snippet in the given file.
file | IN file pointer for the target snippet. |
DGNPLATFORM_EXPORT DgnTextSnippetPropertyMaskPtr Compare | ( | DgnTextSnippetCR | snippet | ) | const |
Compares the snippet with the provided one.
snippet | IN snippet to be comapred against. |
DGNPLATFORM_EXPORT void CopyValues | ( | DgnTextSnippetCR | snippet | ) |
Copies the values into the current snippet from another snippet.
|
static |
Create an in memory representation of any empty snippet with respect to the given file.
name | IN name of the new snippet. Can be empty. |
file | IN The file where the snippet will be stored. |
|
static |
Deletes a DgnTextSnippet from the snippet file.
name | IN name to lookup for. |
file | IN file in which to search. |
|
static |
Looks up the snippet from the given file.
id | IN snippet ID to be fetched. |
file | file in which to search. |
|
static |
Looks up the snippet from the given file.
name | IN name to lookup for. |
file | IN file in which to search. |
DGNPLATFORM_EXPORT DgnTextSnippetCategoryCP GetCategory | ( | ) | const |
Get the category of this snippet.
DGNPLATFORM_EXPORT WString GetDisplayName | ( | ) | const |
Get the display name of this snippet.
DGNPLATFORM_EXPORT DgnFileR GetFile | ( | ) | const |
Get the file associated with this file.
DGNPLATFORM_EXPORT ElementId GetID | ( | ) | const |
Gets the snippet id.
DGNPLATFORM_EXPORT WString GetName | ( | ) | const |
Get the name of this snippet.
DGNPLATFORM_EXPORT TextBlockCP GetSnippetText | ( | ) | const |
Get the text associated with this snippet.
DGNPLATFORM_EXPORT bool IsPersisted | ( | ) | const |
DGNPLATFORM_EXPORT BentleyStatus Replace | ( | WCharCP | oldName = NULL , |
DgnFileP | file = NULL |
||
) |
DGNPLATFORM_EXPORT BentleyStatus SetCategory | ( | DgnTextSnippetCategoryCP | category | ) |
Set the category of this snippet.
DGNPLATFORM_EXPORT BentleyStatus SetDisplayName | ( | WCharCP | name | ) |
Set the display name of this snippet.
DGNPLATFORM_EXPORT BentleyStatus SetName | ( | WCharCP | name | ) |
Set the name of this snippet.
DGNPLATFORM_EXPORT BentleyStatus SetSnippetText | ( | TextBlockCR | text | ) |
Set the snippet text content.
|
static |