Commit 47c1a683 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@347 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent bd76ea8b
......@@ -4,7 +4,7 @@
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = flext
PROJECT_NUMBER = "version 0.4.0"
PROJECT_NUMBER = "version 0.4.0pre"
OUTPUT_DIRECTORY = f:/prog/max/flext/doc/
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
......@@ -48,7 +48,7 @@ SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_UNDOCUMENTED = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
......
......@@ -52,9 +52,13 @@ class flext_base:
friend class flext_obj;
/*! \defgroup FLEXT_CLASS Flext base class
@{
*/
public:
/*! \defgroup FLEXT_C_BASE Flext basic class functionality
/*! \defgroup FLEXT_C_BASE Basic class functionality
@{
*/
......@@ -67,9 +71,11 @@ public:
*/
static bool compatibility;
//! @} FLEXT_C_BASE
// --- inheritable virtual methods --------------------------------
/*! \defgroup FLEXT_C_VIRTUAL Flext virtual base class functions
/*! \defgroup FLEXT_C_VIRTUAL Virtual base class functions
@{
*/
......@@ -80,7 +86,7 @@ public:
//! called on patcher load (not on mere object creation!)
virtual void m_loadbang() {}
//! quickhelp for inlets/outlets (gets calles in MaxMSP only)
//! quickhelp for inlets/outlets (gets called in MaxMSP only)
virtual void m_assist(long /*msg*/,long /*arg*/,char * /*s*/) {}
/*! \brief Called for every incoming message.
......@@ -92,7 +98,7 @@ public:
//! called for every unhandled message (by m_methodmain)
virtual bool m_method_(int inlet,const t_symbol *s,int argc,t_atom *argv);
//! @}
//! @} FLEXT_C_VIRTUAL
// --- inlet/outlet stuff -----------------------------------------
......@@ -164,8 +170,6 @@ public:
class outlet;
// class AtomList;
// class AtomAnything;
//! Retrieve currently processed message tag (NULL if no message processing)
const t_symbol *thisTag() const { return curtag; }
......@@ -226,7 +230,7 @@ public:
void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) { outlet *o = GetOut(n); if(o) ToQueueAnything(o,s,argc,argv); }
void ToQueueAnything(int n,const AtomAnything &any) { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); }
//! @}
//! @} FLEXT_C_INOUT
// --- message handling -------------------------------------------
......@@ -241,7 +245,7 @@ public:
typedef bool (*methfun)(flext_base *c);
/*! \defgroup FLEXT_C_ADDMETHOD Flext method handling
/*! \defgroup FLEXT_C_ADDMETHOD Method handling
\internal
@{
......@@ -273,10 +277,15 @@ public:
//! Set MaxMSP style of distributing list elements over (message) inlets
void SetDist(bool d = true) { distmsgs = d; }
//! @}
//! @} FLEXT_C_ADDMETHOD
// --- bind/unbind ---------------------------------------
/*! \defgroup FLEXT_C_BIND Methods for binding a flext class to a symbol
@{
*/
#ifdef PD
//! Bind object to a symbol
bool Bind(const t_symbol *s) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(s)); return true; }
......@@ -304,10 +313,12 @@ public:
static t_class **GetBound(const t_symbol *s) { return (t_class **)s->s_thing; }
*/
//! @} FLEXT_C_BIND
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
/*! \defgroup FLEXT_C_THREAD Flext thread handling
/*! \defgroup FLEXT_C_THREAD Thread handling
@{
*/
......@@ -346,7 +357,7 @@ public:
#endif // FLEXT_THREADS
//! @}
//! @} FLEXT_C_THREAD
// xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
......@@ -355,6 +366,10 @@ protected:
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
/*! \brief Thread parameters
\internal
*/
class thr_params
{
public:
......@@ -376,19 +391,35 @@ protected:
} *var;
};
/*! \brief This represents an entry to the list of active method threads
\internal
*/
class thr_entry
{
public:
thr_entry(pthread_t id = pthread_self()): thrid(id),nxt(NULL) {}
//! \brief Check if this class represents the current thread
bool Is(pthread_t id = pthread_self()) const { return pthread_equal(thrid,id) != 0; }
pthread_t thrid;
thr_entry *nxt;
};
static bool StartThread(void *(*)(thr_params *p),thr_params *p,char *methname);
/*! \brief Start a method thread
\internal
*/
static bool StartThread(void *(*)(thr_params *p) meth,thr_params *p,char *methname);
/*! \brief Add current thread to list of active threads
\return true on success
\internal
*/
bool PushThread();
/*! \brief Remove current thread from list of active threads
\internal
*/
void PopThread();
#endif
......@@ -400,10 +431,12 @@ protected:
// inlets and outlets
/*! \brief Set up inlets and outlets
\ingroup FLEXT_C_INOUT
\return True on successful creation of all inlets and outlets
*/
virtual bool Init();
//! \brief This represents either an inlet or outlet
struct xlet {
enum type {
tp_none = 0,
......@@ -420,8 +453,7 @@ protected:
xlet *nxt;
};
/*! \addtogroup FLEXT_C_ATTR
/*! \defgroup FLEXT_C_ATTR Attribute handling methods
@{
*/
......@@ -434,27 +466,43 @@ protected:
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(attr,a_ANY,(methfun)get,(methfun)set); }
//! @}
//! @} FLEXT_C_ATTR
/*! \addtogroup FLEXT_C_INOUT
@{
*/
//! \brief get a code for a list of inlets or outlets
unsigned long XletCode(xlet::type tp = xlet::tp_none,...); // end list with 0 (= tp_none) !!
void AddInlets(unsigned long code); // use XletCode to get code value
/*! \brief Add some inlets by a special code representing the types
\remark use XletCode function to get code value
*/
void AddInlets(unsigned long code);
//! \brief Add one or more inlet(s)
void AddInlet(xlet::type tp,int mult = 1,const char *desc = NULL) { AddXlet(tp,mult,desc,inlist); }
void AddOutlets(unsigned long code); // use XletCode to get code value
/*! \brief Add some inlets by a special code representing the types
\remark use XletCode function to get code value
*/
void AddOutlets(unsigned long code);
//! \brief Add one or more outlet(s)
void AddOutlet(xlet::type tp,int mult = 1,const char *desc = NULL) { AddXlet(tp,mult,desc,outlist); }
//! \brief Set the description of an indexed inlet
void DescInlet(int ix,const char *desc) { DescXlet(ix,desc,inlist); }
//! \brief Set the description of an indexed outlet
void DescOutlet(int ix,const char *desc) { DescXlet(ix,desc,outlist); }
//! @}
//! @} FLEXT_C_INOUT
// method handling
//! \brief This represents an item of the method list
class methitem {
public:
methitem(int inlet,const t_symbol *t);
......@@ -471,8 +519,7 @@ protected:
methitem *nxt;
};
// const methitem *FindMethItem(int inlet,const t_symbol *tag,const methitem *st);
//! \brief This represents an item of the attribute list
class attritem {
public:
attritem(const t_symbol *tag,const t_symbol *gtag,metharg tp,methfun gfun,methfun sfun);
......@@ -485,6 +532,8 @@ protected:
attritem *nxt;
};
//! @} FLEXT_CLASS
private:
static void Setup(t_class *c);
......
This diff is collapsed.
......@@ -31,7 +31,12 @@ class flext_dsp:
public:
/*! \defgroup FLEXT_C_DSP Flext basic dsp functionality
/*! \defgroup FLEXT_DSP Flext dsp class
@{
*/
/*! \defgroup FLEXT_C_DSP Basic dsp functionality
@{
*/
......@@ -57,7 +62,7 @@ public:
// --- inheritable virtual methods --------------------------------
/*! \defgroup FLEXT_C_VIRTUAL_DSP Flext virtual dsp functions
/*! \defgroup FLEXT_C_DSP_VIRTUAL Flext virtual dsp functions
@{
*/
......@@ -88,7 +93,7 @@ public:
//! @}
/*! \defgroup FLEXT_C_INOUT_DSP Flext dsp in-/outlet functions
/*! \defgroup FLEXT_C_DSP_INOUT Flext dsp in-/outlet functions
\note These must be called in the class' constructor
@{
......@@ -107,6 +112,7 @@ public:
//! @}
//! @}
protected:
......
......@@ -22,11 +22,14 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
class FLEXT_EXT flext {
/*! \defgroup FLEXT_SUPPORT Flext support class
@{
*/
public:
// --- buffer/array stuff -----------------------------------------
/*! \defgroup FLEXT_N_BUFFER Flext buffer handling
/*! \defgroup FLEXT_S_BUFFER Buffer handling
@{
*/
......@@ -35,6 +38,7 @@ public:
{
public:
/*! \brief Construct buffer.
\param s: symbol name, can be NULL
\param delayed = true: only sets name, needs another Set(NULL) to really initialize the buffer
\remark As externals can be created prior to the buffer objects they are pointing to, initialization should be done at loadbang!
*/
......@@ -97,12 +101,34 @@ public:
#endif
};
//! @}
//! @} FLEXT_S_BUFFER
// --- various symbols --------------------------------------------
// --- utilities --------------------------------------------------
/*! \defgroup FLEXT_S_UTIL Utility functions
@{
*/
/*! \defgroup FLEXT_N_SYMBOL Flext atom/symbol handling
//! Copy an atom
static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; }
//! Print an atom
static void PrintAtom(const t_atom &a,char *buf);
//! Scan an atom
static bool ScanAtom(t_atom &a,const char *buf);
//! Copy a list of atoms
static t_atom *CopyList(int argc,const t_atom *argv);
//! Copy a memory region
static void CopyMem(void *dst,const void *src,int bytes);
//! Sleep for an amount of time
static void Sleep(float s);
//! @} FLEXT_S_UTIL
// --- various symbols --------------------------------------------
/*! \defgroup FLEXT_S_ATOM Atom/list handling
@{
*/
......@@ -143,32 +169,6 @@ public:
//! Check for symbol and get string
static const char *GetAString(const t_symbol *s) { return s?s->s_name:""; }
//! @}
// --- utilities --------------------------------------------------
/*! \defgroup FLEXT_C_UTIL Flext utility functions
@{
*/
//! Copy an atom
static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; }
//! Print an atom
static void PrintAtom(const t_atom &a,char *buf);
//! Scan an atom
static bool ScanAtom(t_atom &a,const char *buf);
//! Copy a list of atoms
static t_atom *CopyList(int argc,const t_atom *argv);
//! Copy a memory region
static void CopyMem(void *dst,const void *src,int bytes);
//! Sleep for an amount of time
static void Sleep(float s);
//! @}
// --- atom stuff ----------------------------------------
//! Set atom from another atom
......@@ -265,11 +265,6 @@ public:
// --- atom list stuff -------------------------------------------
/*! \defgroup FLEXT_N_ATOM Flext atom/list handling
@{
*/
//! Class representing a list of atoms
class AtomList
{
......@@ -360,12 +355,12 @@ public:
const t_symbol *hdr;
};
//! @}
//! @} FLEXT_S_ATOM
// --- clock stuff ------------------------------------------------
/*! \defgroup FLEXT_N_CLOCK Flext clock functions
/*! \defgroup FLEXT_S_CLOCK Flext clock functions
At the moment there are none
......@@ -378,8 +373,7 @@ public:
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
/*! \defgroup FLEXT_N_THREAD Flext thread handling
/*! \defgroup FLEXT_S_THREAD Flext thread handling
@{
*/
......@@ -441,9 +435,12 @@ public:
protected:
pthread_cond_t cond;
};
//! @}
//! @} FLEXT_S_THREAD
#endif // FLEXT_THREADS
//! @}
protected:
static void Setup();
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment