QVectorProxyRo class reference
[Container proxies module]
Declaration
#include <QtLua/QVectorProxy>
namespace QtLua {
template <typename Container, unsigned int max_resize = 0, unsigned int min_resize = 0> class QVectorProxyRo;
};
This class is a member of the QtLua namespace.
This template class is declared in QtLua/qtluaqvectorproxy.hh source file, line 50.
Description
This template class may be used to expose an attached QVector container object to lua script for read access. The QVectorProxy class may be used for read/write access.
QVector may be resized if accessing above current size, depending on max_resize template parameter value. Resize above specified value is not allowed.
See QVectorProxy class documentation for details and examples.
Members
Inherited members
- 30 members inherited from UserData
Types
Private type
- class ProxyIterator
Functions
- QVectorProxyRo()
- QVectorProxyRo(Container &vector)
- virtual bool meta_contains(State *ls, const Value &key)
- virtual Value meta_index(State *ls, const Value &key)
- virtual Value meta_operation(State *ls, ValueBase::Operation op, const Value &a, const Value &b)
- virtual Ref<Iterator> new_iterator(State *ls)
- void set_container(Container *vector)
- virtual bool support(ValueBase::Operation c) const
Private functions
- virtual void completion_patch(String &path, String &entry, int &offset)
- virtual String get_type_name() const
Protected field
- Container *_vector
Members detail
This constructor is declared in QtLua/qtluaqvectorproxy.hh source file, line 55.
Create a QVectorProxy object with no attached container
This constructor is declared in QtLua/qtluaqvectorproxy.hh source file, line 57.
Create a QVectorProxy object and attach given container
This variable is declared in QtLua/qtluaqvectorproxy.hh source file, line 95.
This member access is protected.
This virtual function is declared in QtLua/qtluaqvectorproxy.hh source file, line 69.
This member access is private.
This virtual function overrides the completion_patch
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function may be reimplemented to further modify completion result on console line when completed to a UserData value. This is usefull to append a dot or a pair of brackets access operator to the userdata value name for instance.
Parameters list:
- path: Completion result tables path to userdata value.
- entry: Completion result userdata name. May append to this string directly.
- offset: Cursor offset. May be decreased to place cursor between inserted brackets for instance.
typedef Ref<const QVectorProxyRo, QVectorProxyRo> const_ptr
This typedef is declared in QTLUA_REFTYPE function like macro expansion, line 3 in QtLua/qtluaqvectorproxy.hh source file, line 52.
Shortcut for Ref smart pointer class to QVectorProxyRo type provided for convenience
virtual String get_type_name() const
This virtual function is declared in QtLua/qtluaqvectorproxy.hh source file, line 70.
This member access is private.
This virtual function overrides the get_type_name
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function returns an object type name. The default implementation returns the C++ object type name. This is used for error messages and pretty printing.
The return value is Pretty print object type.
This virtual function is declared in QtLua/qtluaqvectorproxy.hh source file, line 64.
This virtual function overrides the meta_contains
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function returns true if either the ValueBase::OpIndex operation or the ValueBase::OpNewindex operation is supported and an entry is associated to the given key.
The default implementation returns !meta_index(ls, key).is_nil() or false if UserData::meta_index throws.
This virtual function is declared in QtLua/qtluaqvectorproxy.hh source file, line 63.
This virtual function overrides the meta_index
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function 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 must be reimplemented along with this function to report ValueBase::OpIndex as supported.
Parameters list:
- key: Value used as table index.
The return value is Table access result value.
This virtual function is declared in QtLua/qtluaqvectorproxy.hh source file, line 62.
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 must be reimplemented along with this function.
Parameters list:
- op: Specify invoked lua operator (see ValueBase::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 is declared in QtLua/qtluaqvectorproxy.hh source file, line 65.
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 must be reimplemented along with this function to report ValueBase::OpIterate as supported.
The return value is an Iterator based iterator object.
typedef Ref<QVectorProxyRo, QVectorProxyRo> ptr
This typedef is declared in QTLUA_REFTYPE function like macro expansion, line 5 in QtLua/qtluaqvectorproxy.hh source file, line 52.
Shortcut for Ref smart pointer class to QVectorProxyRo type provided for convenience
This function is declared in QtLua/qtluaqvectorproxy.hh source file, line 60.
Attach or detach container. argument may be NULL