.NET Based OPC UA Client/Server SDK  3.0.10.493
UnifiedAutomation.UaBase.StringTable Class Reference

A table of strings. More...

Inherits IList< string >.

Inherited by UnifiedAutomation.UaBase.NamespaceTable.

Public Member Functions

 StringTable ()
 Initializes a new instance of the StringTable class. More...
 
 StringTable (IEnumerable< string > strings)
 Initializes a new instance of the StringTable class. More...
 
int Add (string item)
 Adds the specified item. More...
 
int GetIndexOrAppend (string item)
 Finds the index or appends the string and returns the index. More...
 
ushort TranslateIndex (ushort index, StringTable target)
 Finds the index of the matching string in the target table. More...
 
int TranslateIndex (int index, StringTable target)
 Finds the index of the matching string in the target table. More...
 
ushort[] CreateMapping (StringTable source, bool updateTable)
 Creates a mapping between the URIs in a source table and the indexes in the current table. More...
 
int IndexOf (string item)
 The index of the string. More...
 
virtual void Clear ()
 Clears the table. More...
 
bool Contains (string item)
 Determines whether the table contains the string. More...
 
void CopyTo (string[] array, int arrayIndex)
 Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index. More...
 
IEnumerator< string > GetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 

Protected Attributes

List< string > m_strings
 The list of strings stored in the table. More...
 
object m_lock = new object()
 An object used to synchronize access to the table. More...
 

Properties

string this[int index] [get, set]
 Gets the System.String at the specified index. More...
 
int Count [get]
 Gets the number of strings in the table. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only. More...
 

Detailed Description

A table of strings.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.StringTable.StringTable ( )
inline

Initializes a new instance of the StringTable class.

UnifiedAutomation.UaBase.StringTable.StringTable ( IEnumerable< string >  strings)
inline

Initializes a new instance of the StringTable class.

Parameters
stringsThe strings.

Member Function Documentation

int UnifiedAutomation.UaBase.StringTable.Add ( string  item)
inline

Adds the specified item.

Parameters
itemThe item.
virtual void UnifiedAutomation.UaBase.StringTable.Clear ( )
inlinevirtual

Clears the table.

Reimplemented in UnifiedAutomation.UaBase.NamespaceTable.

bool UnifiedAutomation.UaBase.StringTable.Contains ( string  item)
inline

Determines whether the table contains the string.

Parameters
itemThe item.
Returns
true if the table contains the string; otherwise, false.
void UnifiedAutomation.UaBase.StringTable.CopyTo ( string[]  array,
int  arrayIndex 
)
inline

Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index.

Parameters
arrayThe one-dimensional T:System.Array that is the destination of the elements copied from T:System.Collections.Generic.ICollection`1. The T:System.Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.
ushort [] UnifiedAutomation.UaBase.StringTable.CreateMapping ( StringTable  source,
bool  updateTable 
)
inline

Creates a mapping between the URIs in a source table and the indexes in the current table.

Parameters
sourceThe string table to map.
updateTableif set to true if missing URIs should be added to the current tables.
Returns
A list of indexes in the current table.
IEnumerator<string> UnifiedAutomation.UaBase.StringTable.GetEnumerator ( )
inline

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
int UnifiedAutomation.UaBase.StringTable.GetIndexOrAppend ( string  item)
inline

Finds the index or appends the string and returns the index.

Parameters
itemThe item.
Returns
The index.
int UnifiedAutomation.UaBase.StringTable.IndexOf ( string  item)
inline

The index of the string.

Parameters
itemThe item.
Returns
The index. -1 if the string does not exist.
ushort UnifiedAutomation.UaBase.StringTable.TranslateIndex ( ushort  index,
StringTable  target 
)
inline

Finds the index of the matching string in the target table.

Parameters
indexThe index.
targetThe target.
Returns
int UnifiedAutomation.UaBase.StringTable.TranslateIndex ( int  index,
StringTable  target 
)
inline

Finds the index of the matching string in the target table.

Parameters
indexThe index.
targetThe target.
Returns

Member Data Documentation

object UnifiedAutomation.UaBase.StringTable.m_lock = new object()
protected

An object used to synchronize access to the table.

List<string> UnifiedAutomation.UaBase.StringTable.m_strings
protected

The list of strings stored in the table.

Property Documentation

int UnifiedAutomation.UaBase.StringTable.Count
get

Gets the number of strings in the table.

bool UnifiedAutomation.UaBase.StringTable.IsReadOnly
get

Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only.

Returns
true if the T:System.Collections.Generic.ICollection`1 is read-only; otherwise, false.
string UnifiedAutomation.UaBase.StringTable.this[int index]
getset

Gets the System.String at the specified index.


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