Aspose::Words::Fields::FieldChar Class Reference

Base class for nodes that represent field characters in a document. More...

#include "Aspose.Words.Cpp/Model/Fields/Nodes/FieldChar.h"

Inherits Aspose::Words::SpecialChar.

Inherited by Aspose::Words::Fields::FieldEnd, Aspose::Words::Fields::FieldSeparator, and Aspose::Words::Fields::FieldStart.

Public Member Functions

Aspose::Words::Fields::FieldType get_FieldType () const
 Returns the type of the field. More...
 
bool get_IsLocked () const
 Gets or sets whether the parent field is locked (should not recalculate its result). More...
 
void set_IsLocked (bool value)
 Setter for Aspose::Words::Fields::FieldChar::get_IsLocked. More...
 
bool get_IsDirty () const
 Gets or sets whether the current result of the field is no longer correct (stale) due to other modifications made to the document. More...
 
void set_IsDirty (bool value)
 Setter for Aspose::Words::Fields::FieldChar::get_IsDirty. More...
 
System::SharedPtr< Aspose::Words::Fields::FieldGetField ()
 Returns a field for the field char. More...
 
- Public Member Functions inherited from Aspose::Words::SpecialChar
virtual Aspose::Words::NodeType get_NodeType () const
 Returns NodeType.SpecialChar. More...
 
virtual bool Accept (System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
 Accepts a visitor. More...
 
virtual System::String GetText ()
 Gets the special character that this node represents. More...
 
- Public Member Functions inherited from Aspose::Words::Inline
System::SharedPtr< Aspose::Words::Paragraphget_ParentParagraph ()
 Retrieves the parent Aspose::Words::Paragraph of this node. More...
 
System::SharedPtr< Aspose::Words::Fontget_Font ()
 Provides access to the font formatting of this object. More...
 
bool get_IsInsertRevision ()
 Returns true if this object was inserted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsDeleteRevision ()
 Returns true if this object was deleted in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveFromRevision ()
 Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsMoveToRevision ()
 Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled. More...
 
bool get_IsFormatRevision ()
 Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled. More...
 
System::SharedPtr< Aspose::Words::RunPr > get_RunPr_IInline ()
 
void set_RunPr_IInline (System::SharedPtr< Aspose::Words::RunPr > value)
 
System::SharedPtr< Aspose::Words::Paragraphget_ParentParagraph_IInline ()
 
System::SharedPtr< Aspose::Words::DocumentBaseget_Document_IInline ()
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_InsertRevision ()
 
void set_InsertRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::EditRevision > get_DeleteRevision ()
 
void set_DeleteRevision (System::SharedPtr< Aspose::Words::Revisions::EditRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveFromRevision ()
 
void set_MoveFromRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
System::SharedPtr< Aspose::Words::Revisions::MoveRevision > get_MoveToRevision ()
 
void set_MoveToRevision (System::SharedPtr< Aspose::Words::Revisions::MoveRevision > value)
 
System::SharedPtr< Aspose::Words::RunPr > GetExpandedRunPr_IInline (Aspose::Words::RunPrExpandFlags flags)
 
System::SharedPtr< System::ObjectGetDirectRunAttr (int32_t fontAttr)
 
System::SharedPtr< System::ObjectFetchInheritedRunAttr (int32_t fontAttr)
 
void SetRunAttr (int32_t fontAttr, System::SharedPtr< System::Object > value)
 
void RemoveRunAttr (int32_t key)
 
void ClearRunAttrs ()
 
- Public Member Functions inherited from Aspose::Words::Node
System::SharedPtr< Aspose::Words::CompositeNodeget_ParentNode ()
 Gets the immediate parent of this node. More...
 
virtual System::SharedPtr< Aspose::Words::DocumentBaseget_Document ()
 Gets the document to which this node belongs. More...
 
System::SharedPtr< Aspose::Words::Nodeget_PreviousSibling ()
 Gets the node immediately preceding this node. More...
 
System::SharedPtr< Aspose::Words::Nodeget_NextSibling ()
 Gets the node immediately following this node. More...
 
virtual bool get_IsComposite ()
 Returns true if this node can contain other nodes. More...
 
System::SharedPtr< Aspose::Words::Rangeget_Range ()
 Returns a Range object that represents the portion of a document that is contained in this node. More...
 
System::SharedPtr< Aspose::Words::NodeClone (bool isCloneChildren)
 
template<typename T >
GetAncestorOf ()
 
System::SharedPtr< Aspose::Words::CompositeNodeGetAncestor (Aspose::Words::NodeType ancestorType)
 Gets the first ancestor of the specified Aspose::Words::NodeType. More...
 
void Remove ()
 Removes itself from the parent. More...
 
System::SharedPtr< Aspose::Words::NodeNextPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets next node according to the pre-order tree traversal algorithm. More...
 
System::SharedPtr< Aspose::Words::NodePreviousPreOrder (System::SharedPtr< Aspose::Words::Node > rootNode)
 Gets the previous node according to the pre-order tree traversal algorithm. More...
 
System::String ToString (Aspose::Words::SaveFormat saveFormat)
 Exports the content of the node into a string in the specified format. More...
 
System::String ToString (System::SharedPtr< Aspose::Words::Saving::SaveOptions > saveOptions)
 Exports the content of the node into a string using the specified save options. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from Aspose::Words::Node
static System::String NodeTypeToString (Aspose::Words::NodeType nodeType)
 A utility method that converts a node type enum value into a user friendly string. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Detailed Description

Base class for nodes that represent field characters in a document.

A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.

To easily insert a new field into a document, use the Aspose::Words::DocumentBuilder::InsertField(System::String) method.

See also
Aspose::Words::Fields::FieldStart, Aspose::Words::Fields::FieldSeparator, Aspose::Words::Fields::FieldEnd

Member Function Documentation

◆ get_FieldType()

Aspose::Words::Fields::FieldType Aspose::Words::Fields::FieldChar::get_FieldType ( ) const

Returns the type of the field.

◆ get_IsDirty()

bool Aspose::Words::Fields::FieldChar::get_IsDirty ( ) const

Gets or sets whether the current result of the field is no longer correct (stale) due to other modifications made to the document.

◆ get_IsLocked()

bool Aspose::Words::Fields::FieldChar::get_IsLocked ( ) const

Gets or sets whether the parent field is locked (should not recalculate its result).

◆ GetField()

System::SharedPtr<Aspose::Words::Fields::Field> Aspose::Words::Fields::FieldChar::GetField ( )

Returns a field for the field char.

A new Aspose::Words::Fields::Field object is created each time the method is called.

Returns
A field for the field char.

◆ set_IsDirty()

void Aspose::Words::Fields::FieldChar::set_IsDirty ( bool  value)

◆ set_IsLocked()

void Aspose::Words::Fields::FieldChar::set_IsLocked ( bool  value)