/* Dynamic Editor - J.Dumay - April 2000 */ typeof class = S;; fun getClientNeeded(l)= if l==nil then nil else let l -> [line nxt] in if !strcmp (hd line) "clientNeeded" then conc tl line getClientNeeded nxt else getClientNeeded nxt;; /* Lancement du mode edition sur le serveur */ fun changeEditMode(from,u,action,param,ulist,tag,ui)= C3DaddRegisteredCli UtoC u; UsendMessage ui UtoC u "DynChangeMode" nil ;; fun DYNEDITOR_DelCli (o, cli) = C3DremRegisteredCli cli; 0 ;; fun DYNEDITOR_CloseCli (ui,cli,action,param)= C3DremRegisteredCli cli; 0 ;; fun newOb(o)= OB_CBclientDestroyed o @DYNEDITOR_DelCli; /* enregistrement des fichiers specifiques au plugin dans le .ini */ let hd UgetParam ObUi o "ini" -> f in _RSregisterfiles this f::getClientNeeded strextr _getpack _checkpack f RScontrol; _DMSdefineActions this [strcat ObName o ".edit" mkfun7 @changeEditMode ObUi o ]::nil; /* enregistrement des messages transitant entre le serveur et le client*/ UcbMessage ObUi o ["addFileInExplorator" @addFileInExplorator]::["close" @DYNEDITOR_CloseCli]::nil; 0;; fun IniPlug2(file)= PlugRegister class @newOb nil ;; fun pro () = let "000000000" /*Tony:BigToAsc BigInvn BigFromAsc _getpack _checkpack "dms/3d/plugins/dyneditor/dyneditor.conf" BigFromAsc "93ff4009011b14e5"*/ -> s in let if (strlen s)!=9 then nil else [htoi substr s 1 4 htoi substr s 5 4] -> [datedebut periode] in if periode==nil then (_adderror strcatn (_loc this "PRO_MODULE" nil)::" "::class::" : "::(_loc this "PRO_INVALID_MSG" nil)::nil;0) else if periode==0 then 1 else let ((time>>1)&0x3fffffff)/43200-datedebut -> x in if x<0 then (_adderror strcatn (_loc this "PRO_MODULE" nil)::" "::class::" : "::(_loc this "PRO_INVALID_MSG" nil)::nil;0) else if x<=periode then (_addwarning strcatn (_loc this "PRO_MODULE" nil)::" "::class::" : "::(_loc this "PRO_LIMITED_MSG" (itoa (periode-x))::nil)::nil;1) else (_adderror strcatn (_loc this "PRO_MODULE" nil)::" "::class::" : "::(_loc this "PRO_ENDLIMITED_MSG" nil)::nil;0) ;; fun IniPlug(file)= set class=getInfo strextr _getpack _checkpack file "name"; if pro then IniPlug2 file else PlugRegisterPro class ;;