The functor appended to the mail isn't working! :-)

It's intended use is for template classes in the C++ ffi. MEMBERS:
expects an existing c-type and ;MEMBERS compiles and links the generated
code. The rest should be fairly obvious.

The problem is that when the vocabulary is parsed, MEMBERS: onward are
executed and fail because QList<T> is not a valid c-type.

execute-parsing is invoked in parse-step, but afaict that's no different
with words like TUPLE:. The following FUNCTOR doesn't create a NAME 
tuple when parsed.

FUNCTOR: test1 ( NAME -- ) NAME IS ${NAME} WHERE TUPLE: NAME ; ;FUNCTOR

Where am I going wrong?

Cheers,
Jeremy


FUNCTOR: QList ( T -- )

T IS ${T}
QList<T> IS QList<${T}>
<QList(T)> DEFINES <QList(${T})>
<QList(T)-copy> DEFINES <QList(${T})-copy>

WHERE

MEMBERS: QList<T>

C-INCLUDE: <Qt/QList>
C-LINK/FRAMEWORK: QtCore

CTOR: <QList(T)> ( )

ALIAS-M++ suffix!
     void append ( T value )

M++ T& back ( )
M++ void clear ( )
M++ int count ( )
M++ bool isEmpty ( )

;MEMBERS

;FUNCTOR

------------------------------------------------------------------------------

_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to