Provide Jolie::Value::List typedef.

svn path=/branches/work/~ervin/qtjolie/; revision=989177
This commit is contained in:
Kevin Ottens 2009-06-29 16:57:58 +00:00
parent 09a0e07c39
commit 379085039b
2 changed files with 7 additions and 5 deletions

View File

@ -31,7 +31,7 @@ class ValuePrivate
{
public:
QVariant content;
QMap<QByteArray, QList<Value> > children;
QMap<QByteArray, Value::List> children;
};
} // namespace Jolie
@ -86,12 +86,12 @@ QList<QByteArray> Value::childrenNames() const
return d->children.keys();
}
QList<Value> & Value::children(const QByteArray &name)
Value::List &Value::children(const QByteArray &name)
{
return d->children[name];
}
const QList<Value> & Value::children(const QByteArray &name) const
const Value::List &Value::children(const QByteArray &name) const
{
return d->children[name];
}

View File

@ -32,6 +32,8 @@ class ValuePrivate;
class Q_DECL_EXPORT Value
{
public:
typedef QList<Value> List;
Value();
explicit Value(const QByteArray &content);
@ -45,8 +47,8 @@ public:
Value &operator=(const Value &other);
QList<QByteArray> childrenNames() const;
QList<Value> &children(const QByteArray &name);
const QList<Value> &children(const QByteArray &name) const;
Value::List &children(const QByteArray &name);
const Value::List &children(const QByteArray &name) const;
QByteArray toByteArray() const;
qint32 toInt() const;