Class Placeable
A placeable is a combination of a source token index together with a target token index. Either index can be -1, indicating that no corresponding token pair exists (or no appropriate segment was available). Not both of the indices should be -1.
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
public class Placeable
Constructors
Placeable()
Initializes a new instance with default values.
Declaration
public Placeable()
Placeable(PlaceableType, int, int)
Initializes a new instance with the specified parameters.
Declaration
public Placeable(PlaceableType t, int sourceTokenIndex, int targetTokenIndex)
Parameters
Type | Name | Description |
---|---|---|
PlaceableType | t | The placeable type. |
int | sourceTokenIndex | The index of the token in the source segment. |
int | targetTokenIndex | The index of the token in the target segment. |
Properties
IsTag
Gets a flag which indicates whether this placeable is a tag.
Declaration
public bool IsTag { get; }
Property Value
Type | Description |
---|---|
bool |
SourceTokenIndex
Gets or sets the source-segment token index for the placeable. That index may be -1, indicating that there is no source segment (rare) or no token in the source segment is linked to the target token.
Declaration
[DataMember]
public int SourceTokenIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
TargetTokenIndex
Gets or sets the target-segment token index for the placeable. That index may be -1, indicating that there is no target segment or no token in the target segment is linked to the source token.
Declaration
[DataMember]
public int TargetTokenIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
Type
Gets or sets the placeable type.
Declaration
[DataMember]
public PlaceableType Type { get; set; }
Property Value
Type | Description |
---|---|
PlaceableType |
Methods
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
IsTagCompatible(TagType)
Determines whether the placeable's type is compatible with the specified tag type. The result is always false for non-tag placeables.
Declaration
public bool IsTagCompatible(TagType tagType)
Parameters
Type | Name | Description |
---|---|---|
TagType | tagType | The type of the tag to check |
Returns
Type | Description |
---|---|
bool | true if the placeable's type is compatible with the specified tag type, and false otherwise. |