Search Results for

    Show / Hide Table of Contents

    Class Token

    Token class used by StreamTokenizer. This represents a single token in the input stream. This is subclassed to provide specific token types, such as CharToken, FloatToken, etc.

    Inheritance
    object
    Token
    CharToken
    EofToken
    EolToken
    FloatToken
    IntToken
    StringToken
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: RTools_NTS.Util
    Assembly: NetTopologySuite.dll
    Syntax
    public abstract class Token

    Constructors

    | Edit this page View Source

    Token(int)

    Construct a Token with the specified line number.

    Declaration
    public Token(int line)
    Parameters
    Type Name Description
    int line

    The line number where this token comes from.

    Fields

    | Edit this page View Source

    obj

    A storage object for the data of this token.

    Declaration
    protected object obj
    Field Value
    Type Description
    object

    Properties

    | Edit this page View Source

    LineNumber

    The line number where this token was found. This is base-1.

    Declaration
    public int LineNumber { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Object

    The Object stored by this token. This will be a primitive C# type.

    Declaration
    public object Object { get; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    StringValue

    Return this token's value as a string.

    Declaration
    public virtual string StringValue { get; }
    Property Value
    Type Description
    string

    This token's value as a string.

    | Edit this page View Source

    UntermError

    Whether or not there was an unterminated token problem when creating this token. See UntermErrorMessage for a message associated with the problem.

    Declaration
    public bool UntermError { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    UntermErrorMsg

    The error message if there was an unterminated token error creating this token.

    Declaration
    public string UntermErrorMsg { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    ConvertToType(Type)

    Create an object of the specified type corresponding to this token.

    Declaration
    public object ConvertToType(Type t)
    Parameters
    Type Name Description
    Type t

    The type of object to create.

    Returns
    Type Description
    object

    The new object, or null for error.

    | Edit this page View Source

    Equals(char)

    Equals overload.

    Declaration
    public bool Equals(char c)
    Parameters
    Type Name Description
    char c

    The char to compare to.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    Equals(object)

    Equals override.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    object other

    The object to compare to.

    Returns
    Type Description
    bool

    bool - true for equals, false otherwise.

    Overrides
    object.Equals(object)
    | Edit this page View Source

    Equals(string)

    Equals overload.

    Declaration
    public bool Equals(string s)
    Parameters
    Type Name Description
    string s

    The string to compare to.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    GetHashCode()

    Override. Returns the ToString().GetHashCode().

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    object.GetHashCode()
    | Edit this page View Source

    ToDebugString()

    Produce a string which includes the token type.

    Declaration
    public virtual string ToDebugString()
    Returns
    Type Description
    string
    | Edit this page View Source

    ToLineString()

    Produce a string which includes the line number.

    Declaration
    public string ToLineString()
    Returns
    Type Description
    string

    Operators

    | Edit this page View Source

    operator ==(Token, char)

    Operator== overload. Compare a token and a char.

    Declaration
    public static bool operator ==(Token t, char c)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    char c

    The char.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    operator ==(Token, object)

    Operator== overload. Compare a token and an object.

    Declaration
    public static bool operator ==(Token t, object o)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    object o

    The other object.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    operator ==(Token, string)

    Operator== overload. Compare a token and a string.

    Declaration
    public static bool operator ==(Token t, string s)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    string s

    The string.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    operator !=(Token, char)

    Operator!= overload. Compare a token and a char.

    Declaration
    public static bool operator !=(Token t, char c)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    char c

    The char.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    operator !=(Token, object)

    Operator!= overload. Compare a token and an object.

    Declaration
    public static bool operator !=(Token t, object o)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    object o

    The other object.

    Returns
    Type Description
    bool

    bool

    | Edit this page View Source

    operator !=(Token, string)

    Operator!= overload. Compare a token and a string.

    Declaration
    public static bool operator !=(Token t, string s)
    Parameters
    Type Name Description
    Token t

    The token to compare.

    string s

    The string.

    Returns
    Type Description
    bool

    bool

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX