QHashProxyRo class reference
[Container proxies module]
Declaration
#include <QtLua/QHashProxy>
namespace QtLua {
template <typename Container> class QHashProxyRo;
};
This class is a member of the QtLua namespace.
Description
This template class may be used to expose an attached QHash or QMap container object to lua script for read access. The QHashProxy class may be used for read/write access.
See QHashProxy class documentation for details and examples.
Inheritance
Members
Inherited members
- 19 members inherited from UserData
Types
Functions
- QHashProxyRo()
- QHashProxyRo(Container &hash)
- virtual Value meta_index(State &ls, const Value &key)
- virtual Value meta_operation(State &ls, Value::Operation op, const Value &a, const Value &b)
- virtual Ref<Iterator> new_iterator(State &ls)
- void set_container(Container *hash)
- virtual bool support(Value::Operation c) const
Members detail
Create a QHashProxy object with no attached container
Create a QHashProxy object and attach given container
typedef Ref<const QHashProxyRo, QHashProxyRo> const_ptr
Shortcut for Ref smart pointer class to QHashProxyRo type provided for convenience
This virtual function overrides the meta_index
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This functions is called when a table read access operation is attempted on a userdata object. The default implementation throws an error message. The UserData::support function should be reimplemented along with this function.
Parameters list:
- key: Value used as table index.
The return value is Table access result value.
This virtual function overrides the meta_operation
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function is called when a lua operator is used with a UserData object. The default implementation throws an error message. The UserData::support function should be reimplemented along with this function.
Parameters list:
- op: Specify invoked lua operator (see Value::Operation).
- a: First value involved in operation.
- b: Second value involved in operation for binary operators.
The return value is Operation result value.
This virtual function overrides the new_iterator
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function may return an Iterator object used to iterate over an userdata object. The default implementation throws an error message. The UserData::support function should be reimplemented along with this function.
The return value is an Iterator based iterator object.
typedef Ref<QHashProxyRo, QHashProxyRo> ptr
Shortcut for Ref smart pointer class to QHashProxyRo type provided for convenience
Attach or detach container. argument may be NULL