kjs Library API Documentation

KJS::Identifier Class Reference

Represents an Identifier for a Javascript object. More...

#include <identifier.h>

List of all members.

Public Member Functions

 Identifier ()
 Identifier (const char *s)
 Identifier (const UChar *s, int length)
 Identifier (const UString &s)
const UStringustring () const
DOM::DOMString string () const
QString qstring () const
const UChardata () const
int size () const
const char * ascii () const
bool isNull () const
bool isEmpty () const
unsigned long toULong (bool *ok) const
unsigned toStrictUInt32 (bool *ok) const
unsigned toArrayIndex (bool *ok) const
double toDouble () const

Static Public Member Functions

static Identifier from (unsigned y)
static const Identifiernull ()
static void remove (UString::Rep *)

Friends

class PropertyMap
bool operator== (const Identifier &, const Identifier &)
bool operator!= (const Identifier &, const Identifier &)
bool operator== (const Identifier &, const char *)


Detailed Description

Represents an Identifier for a Javascript object.

Definition at line 32 of file identifier.h.


Constructor & Destructor Documentation

KJS::Identifier::Identifier  )  [inline]
 

Creates an empty identifier.

Definition at line 38 of file identifier.h.

KJS::Identifier::Identifier const char *  s  )  [inline]
 

Creates an identifier with the name of the string.

 KJS::Identifier method("someJSMethod");

Definition at line 45 of file identifier.h.


Member Function Documentation

const UString& KJS::Identifier::ustring  )  const [inline]
 

returns a UString of the identifier

Definition at line 52 of file identifier.h.

Referenced by KJS::FunctionProtoFuncImp::call(), KJS::FunctionImp::call(), KJS::VarDeclNode::evaluate(), KJS::PropertyNode::evaluate(), KJS::AccessorNode2::evaluateReference(), KJS::ResolveNode::evaluateReference(), KJS::ForInNode::execute(), KJS::RegExpObjectImp::get(), KJS::Reference::getValue(), and KJS::FuncDeclNode::processFuncDecl().

QString KJS::Identifier::qstring  )  const
 

returns a QString of the identifier

const UChar* KJS::Identifier::data  )  const [inline]
 

returns a UChar pointer to the string of the identifier with a size defined by size().

Definition at line 62 of file identifier.h.

Referenced by KJS::Lookup::find(), KJS::Lookup::findEntry(), and KJS::Lookup::hash().

int KJS::Identifier::size  )  const [inline]
 

The size of the UChar string returned.

Definition at line 66 of file identifier.h.

Referenced by KJS::Lookup::find(), KJS::Lookup::findEntry(), and KJS::Lookup::hash().

const char* KJS::Identifier::ascii  )  const [inline]
 

Char * of the identifier's string.

Definition at line 71 of file identifier.h.

Referenced by KJS::lookupGetValue(), KJS::lookupPut(), KJS::PropertyMap::put(), KJS::ObjectImp::put(), and KJS::Node::throwError().

bool KJS::Identifier::isNull  )  const [inline]
 

Returns the identfiers state of being unset.

Definition at line 78 of file identifier.h.

Referenced by KJS::PropertyNode::evaluate(), KJS::PropertyMap::get(), KJS::Reference::getPropertyName(), KJS::PropertyMap::put(), KJS::PropertyMap::remove(), KJS::BreakNode::streamTo(), and KJS::ContinueNode::streamTo().

bool KJS::Identifier::isEmpty  )  const [inline]
 

Returns that the identifiers string is set, but is empty.

Definition at line 82 of file identifier.h.

Referenced by KJS::ArgumentsImp::ArgumentsImp(), KJS::FunctionImp::call(), KJS::BreakNode::execute(), and KJS::ContinueNode::execute().

const Identifier & KJS::Identifier::null  )  [static]
 

Creates an empty Identifier.

Definition at line 301 of file identifier.cpp.

Referenced by KJS::FunctionObjectImp::construct(), KJS::ContextImp::ContextImp(), KJS::FuncExprNode::evaluate(), and KJS::FunctionImp::parameterProperty().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kjs Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Nov 1 10:32:48 2005 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003