Update of /cvsroot/pure-data/externals/grill/pool In directory sc8-pr-cvs1:/tmp/cvs-serv31464
Modified Files: data.cpp main.cpp pool.cpp pool.dtd pool.h pool.pd readme.txt Log Message: ""
Index: data.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/data.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** data.cpp 5 Aug 2003 02:37:17 -0000 1.10 --- data.cpp 6 Dec 2003 03:38:13 -0000 1.11 *************** *** 120,123 **** --- 120,132 ---- }
+ I pooldata::PrintAll(const AtomList &d) + { + char tmp[1024]; + d.Print(tmp,sizeof tmp); + pooldir *pd = root.GetDir(d); + strcat(tmp," , "); + return pd?pd->PrintAll(tmp,sizeof tmp):0; + } + I pooldata::CntSub(const AtomList &d) { *************** *** 243,253 **** ret = !strncmp(tmp,"<?xml",5); } if(ret) { fl.getline(tmp,sizeof tmp); // DOCTYPE need not be present / only external DOCTYPE is allowed! ! if(!strncmp(tmp,"<!DOCTYPE",9)) ! fl.getline(tmp,sizeof tmp); ! ret = !strncmp(tmp,"<pool>",6); } if(ret) ret = pd->LdDirXML(fl,depth,mkdir); --- 252,262 ---- ret = !strncmp(tmp,"<?xml",5); } + /* if(ret) { fl.getline(tmp,sizeof tmp); // DOCTYPE need not be present / only external DOCTYPE is allowed! ! ret = !strncmp(tmp,"<!DOCTYPE",9); } + */ if(ret) ret = pd->LdDirXML(fl,depth,mkdir); *************** *** 271,274 **** --- 280,284 ---- if(fl.good()) { fl << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" << endl; + // fl << "<!DOCTYPE pool SYSTEM \"http://www.parasitaere-kapazitaeten.net/ext/pool/pool.dtd\">" << endl; fl << "<!DOCTYPE pool SYSTEM \"pool.dtd\">" << endl; fl << "<pool>" << endl;
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 3 Sep 2003 02:38:08 -0000 1.9 --- main.cpp 6 Dec 2003 03:38:13 -0000 1.10 *************** *** 72,75 **** --- 72,80 ---- V m_cntsub(I argc,const A *argv); // only subdirectories
+ // print directories + V m_printall(); // print values in current dir + V m_printrec(I argc,const A *argv,BL fromroot = false); // print values recursively + V m_printroot() { m_printrec(0,NULL,true); } // print values recursively from root + // cut/copy/paste V m_paste(I argc,const A *argv) { paste(MakeSymbol("paste"),argc,argv,true); } // paste contents of clipboard *************** *** 107,114 **** V ToOutAtom(I ix,const A &a);
V set(const S *tag,I argc,const A *argv,BL over); V getdir(const S *tag); ! I getrec(const S *tag,I level,BL order,BL cntonly = false,const AtomList &rdir = AtomList()); ! I getsub(const S *tag,I level,BL order,BL cntonly = false,const AtomList &rdir = AtomList());
V paste(const S *tag,I argc,const A *argv,BL repl); --- 112,121 ---- V ToOutAtom(I ix,const A &a);
+ enum get_t { get_norm,get_cnt,get_print }; + V set(const S *tag,I argc,const A *argv,BL over); V getdir(const S *tag); ! I getrec(const S *tag,I level,BL order,get_t how = get_norm,const AtomList &rdir = AtomList()); ! I getsub(const S *tag,I level,BL order,get_t how = get_norm,const AtomList &rdir = AtomList());
V paste(const S *tag,I argc,const A *argv,BL repl); *************** *** 179,182 **** --- 186,192 ---- FLEXT_CALLBACK_V(m_cntrec) FLEXT_CALLBACK_V(m_cntsub) + FLEXT_CALLBACK(m_printall) + FLEXT_CALLBACK_V(m_printrec) + FLEXT_CALLBACK(m_printroot)
FLEXT_CALLBACK_V(m_paste) *************** *** 254,257 **** --- 264,271 ---- FLEXT_CADDMETHOD_(c,0,"cntsub",m_cntsub);
+ FLEXT_CADDMETHOD_(c,0,"printall",m_printall); + FLEXT_CADDMETHOD_(c,0,"printrec",m_printrec); + FLEXT_CADDMETHOD_(c,0,"printroot",m_printroot); + FLEXT_CADDMETHOD_(c,0,"paste",m_paste); FLEXT_CADDMETHOD_(c,0,"pasteadd",m_pasteadd); *************** *** 285,289 **** holdname = argc >= 1 && IsSymbol(argv[0])?GetSymbol(argv[0]):NULL;
! AddInAnything(); AddOutList(); AddOutAnything(); --- 299,303 ---- holdname = argc >= 1 && IsSymbol(argv[0])?GetSymbol(argv[0]):NULL;
! AddInAnything("Commands in"); AddOutList(); AddOutAnything(); *************** *** 550,554 **** }
! I pool::getrec(const S *tag,I level,BL order,BL cntonly,const AtomList &rdir) { AtomList gldir(curdir); --- 564,568 ---- }
! I pool::getrec(const S *tag,I level,BL order,get_t how,const AtomList &rdir) { AtomList gldir(curdir); *************** *** 557,579 **** I ret = 0;
! if(cntonly) ! ret = pl->CntAll(gldir); ! else { ! A *k; ! AtomList *r; ! I cnt = pl->GetAll(gldir,k,r); ! if(!k) ! post("%s - %s: error retrieving values",thisName(),GetString(tag)); ! else { ! for(I i = 0; i < cnt; ++i) { ! ToOutAnything(3,tag,0,NULL); ! ToOutList(2,absdir?gldir:rdir); ! ToOutAtom(1,k[i]); ! ToOutList(0,r[i]); ! } ! delete[] k; ! delete[] r; ! } ! ret = cnt; }
--- 571,599 ---- I ret = 0;
! switch(how) { ! case get_cnt: ! ret = pl->CntAll(gldir); ! break; ! case get_print: ! ret = pl->PrintAll(gldir); ! break; ! case get_norm: { ! A *k; ! AtomList *r; ! I cnt = pl->GetAll(gldir,k,r); ! if(!k) ! post("%s - %s: error retrieving values",thisName(),GetString(tag)); ! else { ! for(I i = 0; i < cnt; ++i) { ! ToOutAnything(3,tag,0,NULL); ! ToOutList(2,absdir?gldir:rdir); ! ToOutAtom(1,k[i]); ! ToOutList(0,r[i]); ! } ! delete[] k; ! delete[] r; ! } ! ret = cnt; ! } }
*************** *** 586,590 **** I lv = level > 0?level-1:-1; for(I i = 0; i < cnt; ++i) { ! ret += getrec(tag,lv,order,cntonly,AtomList(rdir).Append(*r[i])); } delete[] r; --- 606,610 ---- I lv = level > 0?level-1:-1; for(I i = 0; i < cnt; ++i) { ! ret += getrec(tag,lv,order,how,AtomList(rdir).Append(*r[i])); } delete[] r; *************** *** 649,653 ****
! I pool::getsub(const S *tag,I level,BL order,BL cntonly,const AtomList &rdir) { AtomList gldir(curdir); --- 669,673 ----
! I pool::getsub(const S *tag,I level,BL order,get_t how,const AtomList &rdir) { AtomList gldir(curdir); *************** *** 667,671 **** ndir.Append(*r[i]);
! if(!cntonly) { ToOutAnything(3,tag,0,NULL); ToOutList(2,curdir); --- 687,691 ---- ndir.Append(*r[i]);
! if(how == get_norm) { ToOutAnything(3,tag,0,NULL); ToOutList(2,curdir); *************** *** 675,679 ****
if(level != 0) ! ret += getsub(tag,lv,order,cntonly,AtomList(rdir).Append(*r[i])); } delete[] r; --- 695,699 ----
if(level != 0) ! ret += getsub(tag,lv,order,how,AtomList(rdir).Append(*r[i])); } delete[] r; *************** *** 726,730 **** { const S *tag = MakeSymbol("cntall"); ! I cnt = getrec(tag,0,false,true); ToOutSymbol(3,tag); ToOutBang(2); --- 746,750 ---- { const S *tag = MakeSymbol("cntall"); ! I cnt = getrec(tag,0,false,get_cnt); ToOutSymbol(3,tag); ToOutBang(2); *************** *** 750,754 **** } ! I cnt = getrec(tag,lvls,false,true); ToOutSymbol(3,tag); ToOutBang(2); --- 770,774 ---- } ! I cnt = getrec(tag,lvls,false,get_cnt); ToOutSymbol(3,tag); ToOutBang(2); *************** *** 775,779 **** }
! I cnt = getsub(tag,lvls,false,true); ToOutSymbol(3,tag); ToOutBang(2); --- 795,799 ---- }
! I cnt = getsub(tag,lvls,false,get_cnt); ToOutSymbol(3,tag); ToOutBang(2); *************** *** 784,787 **** --- 804,838 ---- }
+ V pool::m_printall() + { + const S *tag = MakeSymbol("printall"); + I cnt = getrec(tag,0,false,get_print); + post(""); + } + + V pool::m_printrec(I argc,const A *argv,BL fromroot) + { + const S *tag = MakeSymbol(fromroot?"printroot":"printrec"); + + I lvls = -1; + if(argc > 0) { + if(CanbeInt(argv[0])) { + if(argc > 1) + post("%s - %s: superfluous arguments ignored",thisName(),GetString(tag)); + lvls = GetAInt(argv[0]); + } + else + post("%s - %s: invalid level specification - set to infinite",thisName(),GetString(tag)); + } + + AtomList svdir(curdir); + if(fromroot) curdir.Clear(); + + I cnt = getrec(tag,lvls,false,get_print); + post(""); + + curdir = svdir; + } +
V pool::paste(const S *tag,I argc,const A *argv,BL repl) *************** *** 1070,1076 **** { #if FLEXT_SYS == FLEXT_SYS_PD ! C *sl = strrchr(fn,'/'); ! if(!sl) sl = strrchr(fn,'\'); ! if(!sl) { const C *p = GetString(canvas_getdir(thisCanvas())); return string(p)+'/'+fn; --- 1121,1133 ---- { #if FLEXT_SYS == FLEXT_SYS_PD ! // / and \ must not be mixed! ! C *sl = strchr(fn,'/'); ! if(!sl) sl = strchr(fn,'\'); ! if(!sl || (sl != fn ! #if FLEXT_OS == FLEXT_OS_WIN ! && sl[-1] != ':' // look for drive specification with ":/" or ":\" ! #endif ! )) { ! // prepend absolute canvas path if filename has no absolute path const C *p = GetString(canvas_getdir(thisCanvas())); return string(p)+'/'+fn; *************** *** 1079,1082 **** --- 1136,1140 ---- return fn; #else + #pragma message("Relative file paths not implemented") return fn; #endif
Index: pool.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/pool.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pool.cpp 5 Aug 2003 02:37:17 -0000 1.11 --- pool.cpp 6 Dec 2003 03:38:13 -0000 1.12 *************** *** 295,298 **** --- 295,320 ---- }
+ I pooldir::PrintAll(char *buf,int len) const + { + int offs = strlen(buf); + + I cnt = 0; + for(I vix = 0; vix < vsize; ++vix) { + poolval *ix = vals[vix].v; + for(I i = 0; ix; ++i,ix = ix->nxt) { + PrintAtom(ix->key,buf+offs,len-offs); + strcat(buf+offs," , "); + int l = strlen(buf+offs)+offs; + ix->data->Print(buf+l,len-l); + post(buf); + } + cnt += vals[vix].cnt; + } + + buf[offs] = 0; + + return cnt; + } + I pooldir::GetKeys(AtomList &keys) { *************** *** 453,462 **** }
! static BL ReadAtoms(istream &is,flext::AtomList &l,C del) { - C tmp[1024]; - is.getline(tmp,sizeof tmp,del); - if(is.eof() || !is.good()) return false; - I i,cnt; C *t = tmp; --- 475,480 ---- }
! static BL ParseAtoms(C *tmp,flext::AtomList &l) { I i,cnt; C *t = tmp; *************** *** 474,477 **** --- 492,510 ---- }
+ static BL ParseAtoms(string &s,flext::AtomList &l) + { + return ParseAtoms((C *)s.c_str(),l); + } + + static BL ReadAtoms(istream &is,flext::AtomList &l,C del) + { + C tmp[1024]; + is.getline(tmp,sizeof tmp,del); + if(is.eof() || !is.good()) + return false; + else + return ParseAtoms(tmp,l); + } + static V WriteAtom(ostream &os,const A &a) { *************** *** 552,601 **** }
BL pooldir::LdDirXML(istream &is,I depth,BL mkdir) { ! /* ! for(I i = 1; !is.eof(); ++i) { ! AtomList d,k,*v = new AtomList; ! BL r = ReadAtoms(is,d,','); ! r = r && ReadAtoms(is,k,',') && k.Count() == 1; ! r = r && ReadAtoms(is,*v,'\n') && v->Count();
! if(r) { ! if(depth < 0 || d.Count() <= depth) { ! pooldir *nd = mkdir?AddDir(d):GetDir(d); ! if(nd) { ! nd->SetVal(k[0],v); v = NULL; ! } ! #ifdef FLEXT_DEBUG ! else ! post("pool - directory was not found",i); ! #endif ! } ! } ! else if(!is.eof()) ! post("pool - format mismatch encountered, skipped line %i",i);
! if(v) delete v; ! } ! return true; ! */ ! return false; }
! BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir) { if(dir.Count()) { ! os << "<dir key=""; WriteAtom(os,dir[dir.Count()-1]); ! os << "">" << endl; }
for(I vi = 0; vi < vsize; ++vi) { for(poolval *ix = vals[vi].v; ix; ix = ix->nxt) { ! os << "<value key=""; WriteAtom(os,ix->key); ! os << "">"; WriteAtoms(os,*ix->data); ! os << "</value>" << endl; } } --- 585,778 ---- }
+ class xmltag { + public: + string tag,attr; + bool Ok() const { return tag.length() > 0; } + bool operator ==(const C *t) const { return !tag.compare(t); } + void Clear() { tag.clear(); attr.clear(); } + enum { t_start,t_end,t_empty } type; + }; + + static bool gettag(istream &is,xmltag &t) + { + while(isspace(is.peek())) is.get(); + if(is.peek() == '<') { + is.get(); + char tmp[256]; + is.getline(tmp,sizeof tmp,'>'); + char *tb = tmp,*te = tmp+strlen(tmp)-1,*tf; + + for(; isspace(*tb); ++tb); + if(*tb == '/') { + t.type = xmltag::t_end; + for(++tb; isspace(*tb); ++tb); + } + else { + for(; isspace(*te); --te); + if(*te == '/') { + for(--te; isspace(*te); --te); + t.type = xmltag::t_empty; + } + else + t.type = xmltag::t_start; + } + + for(tf = tb; tf <= te && *tf && !isspace(*tf); ++tf); + t.tag.assign(tb,tf-tb); + while(isspace(*tf)) ++tf; + t.attr.assign(tf,te-tf+1); + return true; + } + else { + t.Clear(); + return false; + } + } + + static void getvalue(istream &is,string &s) + { + char tmp[1024],*t = tmp; + bool intx = false; + for(;;) { + char c = is.peek(); + if(c == '"') intx = !intx; + else if(c == '<' && !intx) break; + *(t++) = is.get(); + } + *t = 0; + s = tmp; + } + BL pooldir::LdDirXML(istream &is,I depth,BL mkdir) { ! AtomList d,k,v; ! bool inpool = false,inval = false,inkey = false,indata = false; ! while(!is.eof()) { ! xmltag tag; ! gettag(is,tag); ! if(!tag.Ok()) { ! // look for value ! string s; ! getvalue(is,s);
! if(s.length() && inpool && ! ( ! (!inval && inkey && d.Count()) || /* dir */ ! (inval && (inkey || indata)) /* value */ ! ) ! ) { ! BL ret; ! if(indata) ! ret = ParseAtoms(s,v); ! else // inkey ! if(inval) ! ret = ParseAtoms(s,k); ! else { ! SetString(d[d.Count()-1],s.c_str()); ! ret = true; ! } ! if(!ret) post("pool - error interpreting XML value (%s)",s.c_str()); ! } ! else ! post("pool - error reading XML data"); ! } ! else if(tag == "pool") { ! if(tag.type == xmltag::t_end) break; ! else inpool = true; ! } ! else if(inpool) { ! if(tag == "dir") { ! if(tag.type == xmltag::t_start) { ! t_atom at; SetString(at,""); ! d.Append(at); ! } ! else if(tag.type == xmltag::t_end) { ! if(d.Count()) ! d.Set(d.Count()-1,d.Atoms(),0,true); ! else ! post("pool - superfluous </dir> in XML data"); ! } ! } ! else if(tag == "value") { ! if(tag.type == xmltag::t_start) { ! inval = true; ! k.Clear(); v.Clear(); ! } ! else if(tag.type == xmltag::t_end) { ! if(depth < 0 || d.Count() <= depth) { ! // NOW set value ! pooldir *nd = mkdir?AddDir(d):GetDir(d); ! if(nd) { ! // only use first word of key ! if(k.Count() == 1) ! nd->SetVal(k[0],new AtomList(v)); ! else ! post("pool - Invalid key (!= 1 atom)"); ! } ! } ! inval = false; ! } ! } ! else if(tag == "key") { ! if(tag.type == xmltag::t_start) { ! inkey = true; ! } ! else if(tag.type == xmltag::t_end) { ! inkey = false; ! } ! } ! else if(tag == "data") { ! if(!inval) ! post("pool - XML tag <data> not within <value>");
! if(tag.type == xmltag::t_start) { ! indata = true; ! } ! else if(tag.type == xmltag::t_end) { ! indata = false; ! } ! } ! #ifdef FLEXT_DEBUG ! else { ! post("pool - unknown XML tag '%s'",tag.tag.c_str()); ! } ! #endif ! } ! else if(tag == "!DOCTYPE") { ! // ignore ! } ! #ifdef FLEXT_DEBUG ! else { ! post("pool - unknown XML tag '%s'",tag.tag.c_str()); ! } ! #endif ! } ! return true; }
! static void indent(ostream &s,I cnt) ! { ! for(I i = 0; i < cnt; ++i) s << '\t'; ! } ! ! BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind) { if(dir.Count()) { ! indent(os,ind); ! os << "<dir>" << endl; ! indent(os,ind+1); ! os << "<key>"; WriteAtom(os,dir[dir.Count()-1]); ! os << "</key>" << endl; }
for(I vi = 0; vi < vsize; ++vi) { for(poolval *ix = vals[vi].v; ix; ix = ix->nxt) { ! indent(os,ind+1); ! os << "<value><key>"; WriteAtom(os,ix->key); ! os << "</key><data>"; WriteAtoms(os,*ix->data); ! os << "</data></value>" << endl; } } *************** *** 605,614 **** for(I di = 0; di < dsize; ++di) { for(pooldir *ix = dirs[di].d; ix; ix = ix->nxt) { ! ix->SvDirXML(os,nd,AtomList(dir).Append(ix->dir)); } } }
! if(dir.Count()) os << "</dir>" << endl; return true; } --- 782,794 ---- for(I di = 0; di < dsize; ++di) { for(pooldir *ix = dirs[di].d; ix; ix = ix->nxt) { ! ix->SvDirXML(os,nd,AtomList(dir).Append(ix->dir),ind+1); } } }
! if(dir.Count()) { ! indent(os,ind); ! os << "</dir>" << endl; ! } return true; }
Index: pool.dtd =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/pool.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pool.dtd 11 Feb 2003 04:37:35 -0000 1.1 --- pool.dtd 6 Dec 2003 03:38:13 -0000 1.2 *************** *** 1,5 **** ! <!ELEMENT pool ((dir|value)*)> ! <!ELEMENT dir ((dir|value)*)> ! <!ATTLIST dir key CDATA #REQUIRED> ! <!ELEMENT value ANY> ! <!ATTLIST value key CDATA #REQUIRED> --- 1,5 ---- ! <!ELEMENT pool (dir|value)*)> ! <!ELEMENT dir (key+,dir*,value*)> ! <!ELEMENT value (key+,data?)> ! <!ELEMENT key (#CDATA)> ! <!ELEMENT data (#CDATA)>
Index: pool.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/pool.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pool.h 5 Aug 2003 02:37:17 -0000 1.8 --- pool.h 6 Dec 2003 03:38:13 -0000 1.9 *************** *** 75,78 **** --- 75,79 ---- I CntAll() const; I GetAll(A *&keys,AtomList *&lst,BL cut = false); + I PrintAll(char *buf,int len) const; I GetKeys(AtomList &keys); I CntSub() const; *************** *** 88,92 **** BL LdDirXML(istream &is,I depth,BL mkdir); BL SvDir(ostream &os,I depth,const AtomList &dir = AtomList()); ! BL SvDirXML(ostream &os,I depth,const AtomList &dir = AtomList());
int VSize() const { return vsize; } --- 89,93 ---- BL LdDirXML(istream &is,I depth,BL mkdir); BL SvDir(ostream &os,I depth,const AtomList &dir = AtomList()); ! BL SvDirXML(ostream &os,I depth,const AtomList &dir = AtomList(),I ind = 0);
int VSize() const { return vsize; } *************** *** 133,136 **** --- 134,138 ---- poolval *Refi(const AtomList &d,I ix); I CntAll(const AtomList &d); + I PrintAll(const AtomList &d); I GetAll(const AtomList &d,A *&keys,AtomList *&lst); I CntSub(const AtomList &d);
Index: pool.pd =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/pool.pd,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pool.pd 3 Sep 2003 02:38:08 -0000 1.8 --- pool.pd 6 Dec 2003 03:38:13 -0000 1.9 *************** *** 1,14 **** ! #N canvas 12 3 936 692 12; ! #X msg 295 108 set 1 2 3; #X obj 308 619 print K; #X msg 607 211 getall; ! #X msg 295 137 set A k g; #X obj 259 648 print V; #X obj 357 593 print D; ! #X msg 295 167 set A l m; ! #X msg 298 196 set 2 34; ! #X msg 428 105 clr A; ! #X msg 428 168 get A; ! #X msg 428 193 get 2; #X msg 40 132 echodir $1; #X obj 40 111 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 --- 1,14 ---- ! #N canvas 12 3 946 702 12; ! #X msg 296 105 set 1 2 3; #X obj 308 619 print K; #X msg 607 211 getall; ! #X msg 296 134 set A k g; #X obj 259 648 print V; #X obj 357 593 print D; ! #X msg 296 164 set A l m; ! #X msg 299 193 set 2 34; ! #X msg 429 102 clr A; ! #X msg 429 165 get A; ! #X msg 429 190 get 2; #X msg 40 132 echodir $1; #X obj 40 111 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 *************** *** 17,22 **** ; #X msg 40 234 absdir $1; ! #X text 427 85 clear value; ! #X text 424 146 get value; #X obj 406 564 print C; #X text 478 564 command; --- 17,22 ---- ; #X msg 40 234 absdir $1; ! #X text 428 82 clear value; ! #X text 425 143 get value; #X obj 406 564 print C; #X text 478 564 command; *************** *** 29,38 **** #X msg 42 405 reset; #X text 41 384 clear all pool data; ! #X msg 613 111 clrall; ! #X text 604 89 clear all values in dir; #X text 607 190 get all values in dir; #X text 175 500 pool name can be given as argument; ! #X text 603 136 clear all values and dirs; ! #X msg 611 158 clrrec; #X msg 605 258 getrec; #X text 605 236 get all values in dir and subdirs; --- 29,38 ---- #X msg 42 405 reset; #X text 41 384 clear all pool data; ! #X msg 608 111 clrall; ! #X text 599 89 clear all values in dir; #X text 607 190 get all values in dir; #X text 175 500 pool name can be given as argument; ! #X text 598 136 clear all values and dirs; ! #X msg 606 158 clrrec; #X msg 605 258 getrec; #X text 605 236 get all values in dir and subdirs; *************** *** 43,47 **** #X text 40 89 at each command; #X text 40 73 echo current dir; ! #X text 292 83 set values; #X text 35 194 (default on); #X text 27 178 report absolute dirs; --- 43,47 ---- #X text 40 89 at each command; #X text 40 73 echo current dir; ! #X text 293 80 set values; #X text 35 194 (default on); #X text 27 178 report absolute dirs; *************** *** 49,59 **** #X text 86 453 get some info; #X text 670 274 default=-1 (= infinite); ! #X msg 609 338 cntall; ! #X text 675 336 count all values in dir; ! #X msg 609 364 cntrec; ! #X text 677 362 ... and subdirs; ! #X text 673 376 (depth may be given); ! #X text 294 261 set but don't replace; ! #N canvas 0 0 514 540 dirs 0; #X msg 109 27 mkdir fld1; #X msg 111 122 chdir; --- 49,59 ---- #X text 86 453 get some info; #X text 670 274 default=-1 (= infinite); ! #X msg 609 340 cntall; ! #X text 675 338 count all values in dir; ! #X msg 609 366 cntrec; ! #X text 677 364 ... and subdirs; ! #X text 673 378 (depth may be given); ! #X text 295 258 set but don't replace; ! #N canvas 0 0 520 546 dirs 0; #X msg 109 27 mkdir fld1; #X msg 111 122 chdir; *************** *** 93,99 **** #X connect 22 0 26 0; #X connect 23 0 26 0; ! #X restore 718 511 pd dirs; ! #X text 715 485 directory operations; ! #N canvas 0 0 821 453 file 0; #X text 117 207 save dir and subdirs; #X text 117 165 save data in current dir; --- 93,99 ---- #X connect 22 0 26 0; #X connect 23 0 26 0; ! #X restore 716 496 pd dirs; ! #X text 713 470 directory operations; ! #N canvas 0 0 829 461 file 0; #X text 117 207 save dir and subdirs; #X text 117 165 save data in current dir; *************** *** 142,149 **** #X connect 30 0 18 0; #X connect 31 0 18 0; ! #X restore 719 566 pd file; ! #X text 717 543 file operations; ! #X text 717 600 clipboard operations; ! #N canvas 0 0 535 583 clip 0; #X text 97 56 copy value associated to key into clipboard; #X msg 100 77 copy A; --- 142,149 ---- #X connect 30 0 18 0; #X connect 31 0 18 0; ! #X restore 717 551 pd file; ! #X text 715 528 file operations; ! #X text 715 585 clipboard operations; ! #N canvas 0 0 541 589 clip 0; #X text 97 56 copy value associated to key into clipboard; #X msg 100 77 copy A; *************** *** 183,189 **** #X connect 21 0 26 0; #X connect 23 0 26 0; ! #X restore 719 623 pd clip; ! #X text 717 454 more commands:; ! #X obj 289 389 r $0-pool; #X text 174 517 data is shared among pool objects with the same name ; --- 183,189 ---- #X connect 21 0 26 0; #X connect 23 0 26 0; ! #X restore 716 606 pd clip; ! #X text 715 439 more commands:; ! #X obj 298 389 r $0-pool; #X text 174 517 data is shared among pool objects with the same name ; *************** *** 199,209 **** #X text 272 13 a hierarchical storage object , (C)2002-2003 Thomas Grill; ! #X msg 296 282 add 2 14; #X obj 260 478 pool @valcnt 10 @dircnt 5; ! #X text 332 442 expected value and directory counts; ! #X text 332 457 can be given for optimal performance; ! #X msg 428 218 get 3; ! #X msg 299 227 set 3 -1 1; #X msg 41 518 getmethods; #X connect 0 0 72 0; #X connect 2 0 72 0; --- 199,227 ---- #X text 272 13 a hierarchical storage object , (C)2002-2003 Thomas Grill; ! #X msg 297 279 add 2 14; #X obj 260 478 pool @valcnt 10 @dircnt 5; ! #X text 330 437 expected value and directory counts; ! #X text 330 452 can be given for optimal performance; ! #X msg 429 215 get 3; ! #X msg 300 224 set 3 -1 1; #X msg 41 518 getmethods; + #X text 328 466 (see attributes in properties dialog); + #X text 715 638 console printout; + #N canvas 0 0 553 284 print 0; + #X obj 21 231 s $0-pool; + #X msg 109 80 printall; + #X msg 109 132 printrec; + #X text 110 60 print all values in dir; + #X text 109 112 print values in dir and subdirs; + #X text 179 131 (depth may be given); + #X text 22 12 print-to-console operations; + #X text 190 185 (depth may be given); + #X msg 109 181 printroot; + #X text 109 161 print values in dir and subdirs (starting from root) + ; + #X connect 1 0 0 0; + #X connect 2 0 0 0; + #X connect 8 0 0 0; + #X restore 717 659 pd print; #X connect 0 0 72 0; #X connect 2 0 72 0;
Index: readme.txt =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/readme.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** readme.txt 19 Sep 2003 02:37:59 -0000 1.12 --- readme.txt 6 Dec 2003 03:38:13 -0000 1.13 *************** *** 64,68 **** - database can be saved/loaded as XML data - fixed bug with stored numbers starting with - or + ! - file names without paths will use the folder of the current patcher
0.1.0: --- 64,69 ---- - database can be saved/loaded as XML data - fixed bug with stored numbers starting with - or + ! - relative file names will be based on the folder of the current patcher ! - added printall, printrec, printroot messages for console printout
0.1.0: *************** *** 79,82 **** general: - what is output as value if it is key only? (Max->nothing!) ! - XML interpretation? (only files written by pool or others too)
--- 80,83 ---- general: - what is output as value if it is key only? (Max->nothing!) ! - XML format ok?