Class TableObject
Defines classes that can be accessed by name. They are usually part of the DXF TABLE section but can also be part of the OBJECTS section.
Inheritance
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public abstract class TableObject : DxfObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceTableObject(String, String, Boolean)
Initializes a new instance of the TableObject class.
Declaration
protected TableObject(string name, string codeName, bool checkName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Table name. The following characters <>/?":;*|,=` are not supported for table object names. |
| System.String | codeName | Table DxfObjectCode. |
| System.Boolean | checkName | Defines if the table object name needs to be checked for invalid characters. |
Properties
| Improve this Doc View SourceInvalidCharacters
Gets the array of characters not supported as table object names.
Declaration
public static char[] InvalidCharacters { get; }
Property Value
| Type | Description |
|---|---|
| System.Char[] |
IsReserved
Gets if the table object is reserved and cannot be deleted.
Declaration
public bool IsReserved { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Name
Gets the name of the table object.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Table object names are case insensitive.
XData
Gets the table XDataDictionary.
Declaration
public XDataDictionary XData { get; }
Property Value
| Type | Description |
|---|---|
| XDataDictionary |
Methods
| Improve this Doc View SourceClone()
Creates a new table object that is a copy of the current instance.
Declaration
public abstract object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new table object that is a copy of this instance. |
Clone(String)
Creates a new table object that is a copy of the current instance.
Declaration
public abstract TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | TableObject name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new table object that is a copy of this instance. |
CompareTo(TableObject)
Compares the current TableObject with another TableObject of the same type.
Declaration
public int CompareTo(TableObject other)
Parameters
| Type | Name | Description |
|---|---|---|
| TableObject | other | A TableObject to compare with this TableObject. |
Returns
| Type | Description |
|---|---|
| System.Int32 | An integer that indicates the relative order of the table objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter. Zero This object is equal to other. Greater than zero This object is greater than other. |
Remarks
If both table objects are not of the same type it will return zero. The comparison is made by their names.
CompareTo(Object)
Compares the current TableObject with another TableObject of the same type.
Declaration
public int CompareTo(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other | A TableObject to compare with this TableObject. |
Returns
| Type | Description |
|---|---|
| System.Int32 | An integer that indicates the relative order of the table objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter. Zero This object is equal to other. Greater than zero This object is greater than other. |
Remarks
If both table objects are no of the same type it will return zero. The comparison is made by their names.
Equals(TableObject)
Check if two TableObject are equal.
Declaration
public bool Equals(TableObject other)
Parameters
| Type | Name | Description |
|---|---|---|
| TableObject | other | Another TableObject to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if two TableObject are equal or false in any other case. |
Remarks
Two TableObjects are considered equals if their names are the same, regardless of their internal values. This is done this way because in a dxf two TableObjects cannot have the same name.
Equals(Object)
Check if two TableObject are equal.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other | Another TableObject to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if two TableObject are equal or false in any other case. |
Overrides
Remarks
Two TableObjects are considered equals if their names are the same, regardless of their internal values. This is done this way because in a dxf two TableObjects cannot have the same name.
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer that is the hash code for this instance. |
Overrides
IsValidName(String)
Checks if a string is valid as a table object name.
Declaration
public static bool IsValidName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | String to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the string is valid as a table object name, or false otherwise. |
OnNameChangedEvent(String, String)
Declaration
protected virtual void OnNameChangedEvent(string oldName, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldName | |
| System.String | newName |
OnXDataAddAppRegEvent(ApplicationRegistry)
Declaration
protected virtual void OnXDataAddAppRegEvent(ApplicationRegistry item)
Parameters
| Type | Name | Description |
|---|---|---|
| ApplicationRegistry | item |
OnXDataRemoveAppRegEvent(ApplicationRegistry)
Declaration
protected virtual void OnXDataRemoveAppRegEvent(ApplicationRegistry item)
Parameters
| Type | Name | Description |
|---|---|---|
| ApplicationRegistry | item |
ToString()
Converts the value of this instance to its equivalent string representation.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | The string representation. |
Overrides
Events
| Improve this Doc View SourceNameChanged
Declaration
public event TableObject.NameChangedEventHandler NameChanged
Event Type
| Type | Description |
|---|---|
| TableObject.NameChangedEventHandler |
XDataAddAppReg
Declaration
public event XDataAddAppRegEventHandler XDataAddAppReg
Event Type
| Type | Description |
|---|---|
| XDataAddAppRegEventHandler |
XDataRemoveAppReg
Declaration
public event XDataRemoveAppRegEventHandler XDataRemoveAppReg
Event Type
| Type | Description |
|---|---|
| XDataRemoveAppRegEventHandler |