2.1.25.55 okutil_parse_complete_range_string


Description

Parse a complete range string into page descriptor, layer descriptor and object descriptor separately.

Syntax

OC_API BOOL	okutil_parse_complete_range_string(LPCSTR lpcszString, string* pstrPageDescriptor, string* pstrLayerDescriptor, string* pstrObjectDescriptor, DWORD dwCntrl = PRS_SINGLEWORD_KEYWORD_OBJECT | PRS_SINGLEWORD_BOOK);

Parameters

lpcszString
[input] Range string to be parsed
pstrPageDescriptor
[output] Receives page descriptor
pstrLayerDescriptor
[output] Receives layer descriptor
pstrObjectDescriptor
[output] Receives object descriptor
dwCntrl
[input] Bitwise falg indicating how range string should be parsed

Must be one of the following:

PRS_SINGLEWORD_KEYWORD_SHEET					= 0x00000020,
PRS_SINGLEWORD_KEYWORD_BOOK						= 0x00000030,
PRS_SINGLEWORD_KEYWORD_MASK						= 0x000000F0,
PRS_SINGLEWORD_OBJECT							= 0x00000100,
PRS_SINGLEWORD_SHEET							= 0x00000200,
PRS_SINGLEWORD_BOOK								= 0x00000300,
PRS_SINGLEWORD_LOOSE_DATASET					= 0x00000400,
PRS_SINGLEWORD_MASK								= 0x00000F00,
PRS_CVT_PAGE_LONGNAME_TO_SN						= 0x00001000,
PRS_PARSE_MASK									= 0x0000FFFF,

PRSC_NUMERIC_OBJECT_DESCRIPTOR_NONE				= 0x00010000,
PRSC_NUMERIC_OBJECT_DESCRIPTOR_MAT				= 0x00020000,
PRSC_NUMERIC_OBJECT_DESCRIPTOR_COL				= 0x00030000,
PRSC_NUMERIC_OBJECT_DESCRIPTOR_PLOT				= 0x00040000,
PRSC_NUMERIC_OBJECT_DESCRIPTOR_COMPLETION_MASK	= 0x000F0000,
PRSC_LEVEL_PAGE									= 0x00100000,
PRSC_LEVEL_LAYER								= 0x00200000,
PRSC_LEVEL_OBJECT								= 0x00300000,
PRSC_LEVEL_MASK									= 0x00F00000,
PRSC_OMIT_UNNECESARY							= 0x01000000,
PRSC_DO_NOT_ENCLOSE_INTO_PARETHESIS				= 0x02000000,
PRSC_FULL_SHEET_IF_NO_OBJECT					= 0x04000000,
PRSC_COMPLETE_MASK								= 0xFFFF0000,

Return

Return TRUE if the parsing is successful.

Examples

EX1

void okutil_parse_complete_range_string_ex1()
{    
    string strRange = "[Book1]Sheet1!Col(A)";
    string strPage, strLayer, strObject;
    if ( okutil_parse_complete_range_string(strRange, &strPage, &strLayer, &strObject) )
    {
    	printf("Page Name : %s, Layer Name : %s, Object Name : %s", strPage, strLayer, strObject);
    }
}

Remark

See Also

okutil_create_complete_range_string_obj

Header to Include

origin.h

Reference