summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsinterpreter.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-11-09 16:02:59 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2011-11-15 11:10:43 +0100
commitdfd58916cd20abc50536a9793952c53ce82ac72c (patch)
treedbdcb7ad80eafe19b20a5560c8480500dea07ee5 /src/libs/qmljs/qmljsinterpreter.cpp
parent35cad941c9f05770c5eaa9318efdd9486d3e80f8 (diff)
downloadqt-creator-dfd58916cd20abc50536a9793952c53ce82ac72c.tar.gz
QmlJS: Add documentation for QmlJS::Value.
Also: * Remove unnecessary QmlJS:: qualifications in existing documentation. * Remove unnecessary explicit links in the documentation. Change-Id: Icb41941d98b5cfe9d2fb3b3887fafee16635eb13 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 5ccbfb1b90..5a0dbefa4a 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -61,6 +61,35 @@ using namespace LanguageUtils;
using namespace QmlJS;
using namespace QmlJS::AST;
+/*!
+ \class QmlJS::Value
+ \brief Abstract base class for the result of a JS expression.
+ \sa Evaluate ValueOwner ValueVisitor
+
+ A Value represents a category of JavaScript values, such as number
+ (NumberValue), string (StringValue) or functions with a
+ specific signature (FunctionValue). It can also represent internal
+ categories such as "a QML component instantiation defined in a file"
+ (ASTObjectValue), "a QML component defined in C++"
+ (CppComponentValue) or "no specific information is available"
+ (UnknownValue).
+
+ The Value class itself provides accept() for admitting
+ \l{ValueVisitor}s and a do-nothing getSourceLocation().
+
+ Value instances should be cast to a derived type either through the
+ asXXX() helper functions such as asNumberValue() or via the
+ value_cast() template function.
+
+ Values are the result of many operations in the QmlJS code model:
+ \list
+ \o \l{Evaluate}
+ \o Context::lookupType() and Context::lookupReference()
+ \o ScopeChain::lookup()
+ \o ObjectValue::lookupMember()
+ \endlist
+*/
+
namespace {
class LookupMember: public MemberProcessor