SnapTypeBaseT Class

The interface that is required to use as a value in the sorted tree.

Definition

Namespace: SnapDB.Snap
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public abstract class SnapTypeBase<T> : SnapTypeBase, 
	IComparable<T>, IEquatable<T>, IComparer<T>
where T : new(), SnapTypeBase<T>
Inheritance
Object    SnapTypeBase    SnapTypeBaseT
Derived
Implements
IComparerT, IComparableT, IEquatableT

Type Parameters

T
A class that has a default constructor

Remarks

It is highly recommended to override many of the base class methods as many of these methods are slow. The following methods should be overriden if possible: Read(byte*) Write(byte*) IsLessThan(T) IsEqualTo(T) IsGreaterThan(T) IsLessThanOrEqualTo(T) IsBetween(T,T) CompareTo(byte*) IsLessThanOrEqualTo(byte*, byte*) For better random I/O inserts, it is also a good idea to implement a custom SnapTypeCustomMethodsT that overrides the BinarySearch(Byte*, T, Int32, Int32) method.

Constructors

SnapTypeBaseTInitializes a new instance of the SnapTypeBaseT class

Properties

GenericTypeGuid The GUID uniquely defining this type. It is important to uniquely tie 1 type to 1 GUID.
(Inherited from SnapTypeBase)
Size Gets the size of this class when serialized.
(Inherited from SnapTypeBase)

Methods

Clear Clears the key.
(Inherited from SnapTypeBase)
Clone Creates a new instance that is a copy of the current instance.
Compare Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
CompareTo(Byte*) Compares the current T object with the data in the provided byte stream.
CompareTo(T) Compares the current instance to other.
CopyTo Copies the source to the destination.
CreateValueMethods Creates and returns an instance of custom methods for handling values of the T type.
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
Equals(T) Indicates whether the current object is equal to another object of the same type.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsBetween Determines whether the current instance falls within a specified range defined by lower and upper bounds.
IsEqualTo Compares the current instance with another instance of the same type and determines whether they are equal.
IsGreaterThan Determines whether the current instance is greater than a specified value.
IsGreaterThanOrEqualTo Determines whether the current instance is greater than or equal to a specified value.
IsLessThan Determines whether the current instance is less than a specified value.
IsLessThanOrEqualTo Determines whether the current instance is less than or equal to a specified value.
IsNotEqualTo Compares the current instance with another instance of the same type and determines whether they are not equal.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
MethodCopy Executes a copy command without modifying the current class.
(Inherited from SnapTypeBase)
Read(BinaryStreamBase) Reads the provided key from the stream.
(Inherited from SnapTypeBase)
Read(Byte*) Reads the key from the stream.
(Inherited from SnapTypeBase)
Read(Stream) Reads the provided key from the stream.
(Inherited from SnapTypeBase)
SetMax Sets the provided key to its maximum value.
(Inherited from SnapTypeBase)
SetMin Sets the provided key to its minimum value.
(Inherited from SnapTypeBase)
ToStringReturns a string that represents the current object.
(Inherited from Object)
Write(BinaryStreamBase) Writes the provided data to the BinaryWriter.
(Inherited from SnapTypeBase)
Write(Byte*) Writes the key to the stream.
(Inherited from SnapTypeBase)
Write(Stream) Writes the provided key to the stream.
(Inherited from SnapTypeBase)

See Also