Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScript
Class CPropertyName

class CPropertyName {
public:
    CPropertyName();
    CPropertyName(const CPropertyName &name);
    CPropertyName(const CString &strName);
    CPropertyName(const WCHAR *pszName);
    CPropertyName(CInt32 nIndex);
    ~CPropertyName();
public:
    const CPropertyName &operator=(const CPropertyName &name);
    CString GetName() const;
    CInt32 GetIndex() const;
    CInt32 GetHash() const;
    void ResetHash();
    };

The ECMAScript property name.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CPropertyName ();
����������Constructs the property name.
CPropertyName (const CPropertyName &name);
����������Constructs the property name by copying content of another property name.
CPropertyName (const CString &strName);
����������Constructs the property name from a string.
CPropertyName (const WCHAR *pszName);
����������Constructs the property name from a null-terminated string.
CPropertyName (CInt32 nIndex);
����������Constructs the property name from an integer array index value.
~CPropertyName ();
����������Destroys the property name.

Function Summary
CString GetName ();
����������Returns a string representation of this property name.
CInt32 GetIndex ();
����������Returns an array index represented by this property name.
CInt32 GetHash ();
����������Returns the hash code calculated for this property name.
void ResetHash ();
����������Calculates the hash code for this property name.

Constructor/Destructor Detail

CPropertyName

CPropertyName();

Constructs the property name.

The content of the property name object constructed this way is initially unspecified.

CPropertyName

CPropertyName(const CPropertyName &name);

Constructs the property name by copying content of another property name.

Parameters:
name - the property name to copy

CPropertyName

CPropertyName(const CString &strName);

Constructs the property name from a string.

The string argument represents the property name.

Parameters:
strName - the string representation of the property name

CPropertyName

CPropertyName(const WCHAR *pszName);

Constructs the property name from a null-terminated string.

The null-terminated string argument represents the property name.

Parameters:
pszName - the null-terminated string representation of the property name

CPropertyName

CPropertyName(CInt32 nIndex);

Constructs the property name from an integer array index value.

Used to construct property names which may be, in the appropriate context, interpreted as ECMAScript array indexes.

Parameters:
nIndex - the integer array index

~CPropertyName

~CPropertyName();

Destroys the property name.

Function Detail

GetName

CString GetName();

Returns a string representation of this property name.

Returns:
the string representation of this property name

GetIndex

CInt32 GetIndex();

Returns an array index represented by this property name.

Returns:
the array index represented by this property name; -1 if this property name does not represent an array index

GetHash

CInt32 GetHash();

Returns the hash code calculated for this property name.

Returns:
the hash code calculated for this property name; -1 if the hash code is not yet calculated

ResetHash

void ResetHash();

Calculates the hash code for this property name.

The calculated hash code is stored as an internal member of this property name object and can be later retrieved with GetHash .


Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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