Unicorn XML Toolkit
Version 1.00.00

Namespace RegExp
Class CResult

class CResult {
public:
    CResult();
    ~CResult();
public:
    void Add(int nOffset, int nLength);
    int GetSize();
    void GetAt(int nIndex, int &nOffset, int &nLength);
    void RemoveAll();
    };

The capture array obtained as the result of successful regular expression match.

The capture array consists of pairs (offset, length). The nth element of this array contains the offset of the nth capture in the input string, and the length of the nth capture.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CResult ();
����������Constructs the capture array.
~CResult ();
����������Destroys the capture array.

Function Summary
void Add (int nOffset, int nLength);
����������Adds an (offset, length) pair to the end of this capture array.
int GetSize ();
����������Returns a number of captures in this capture array.
void GetAt (int nIndex, int &nOffset, int &nLength);
����������Returns parameters of a capture at the specified index.
void RemoveAll ();
����������Removes all captures from this capture array.

Constructor/Destructor Detail

CResult

CResult();

Constructs the capture array.

~CResult

~CResult();

Destroys the capture array.

Function Detail

Add

void Add(int nOffset, int nLength);

Adds an (offset, length) pair to the end of this capture array.

Parameters:
nOffset - the offset of the capture in the input string
nLength - the length of the capture

GetSize

int GetSize();

Returns a number of captures in this capture array.

Returns:
the number of captures in this capture array

GetAt

void GetAt(int nIndex, int &nOffset, int &nLength);

Returns parameters of a capture at the specified index.

Parameters:
nIndex - the index (zero-based)
nOffset - on return, the offset of the capture at the specified index
nLength - on return, the length of the capture at the specified index

RemoveAll

void RemoveAll();

Removes all captures from this capture array.


Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.