305%%
%%
%%
%%
%%Copyright1994-2019TheMathWorks,Inc.
%%
%%Description:
%%ThisTLClibraryfilecontainsfunctionforcachingcodefortheshared
%%utilitiessrcdirectory.
 
%if EXISTS("_CACHE_SHAREDUTILS_LIB_") == 0
%assign _CACHE_SHAREDUTILS_LIB_ = 1
 
%%
%%Designofglobalvariable::GlobalSharedUtilsIncludes
%%
%%::GlobalSharedUtilsIncludesisavectorofvectors.
%%Itcanalsobethoughtofasaraggedtwodimensionalarray.
%%Isservesasstackforstoringincludeheaderfilerequirementsfor
%%sharedutilities.
%%
%%AtypicalGlobalSharedUtilsIncludesLOGICALLYlooksasfollowing:
%%topnewest["","custom1.h","custom2.h"]
%%[]
%%bottomoldest["math.h",""]
%%Notethephysicallayoutisthereverseofthelogicallayout.The
%%newestitemsareatthehighestrowindex.
%%
%%EachrowofGlobalSharedUtilsIncludescontainstheheaderfilesthat
%%willbeneededbyafunction.Thisfunctionscanbecreatedin
%%anestedmanner,hencetheneedforastack.Autilitycanincrementally
%%addadditionalheaderfilestoitsrowinthestack.
 
%%Tohelpdevelopersaccessthestack,severalstackfunctionsareavailable
%%tooperateon::GlobalSharedUtilsIncludes.
%%
%%LibPushStackSharedUtilsIncludes(inputVector)
%%--itwillpushanentirenewvectorofincludesintotopofstack,
%%inotherwords,anewrowwillbeinsertedintological-top
%%stackposition.
%%
%%LibPushEmptyStackSharedUtils()
%%--itwillpushanemptyvectorofincludesintotopofstack,
%%inotherwords,anewrowwillbeinsertedintological-top
%%stackpositionandthatrowwillbeempty.Thisisusefulfor
%%initializingthesetofheaderfilesrequiredbyautility.
%%
%%LibPopStackSharedUtilsIncludes()
%%--Fromthelogicaltopofthestackremoveanentirerowand
%%returnthatvector.
%%
%%LibAddtoSharedUtilsIncludes(incFileName)
%%--Addanindividualelementtothelistofheaderfilesat
%%thecurrentlogical-topofstack.Therowvectoratthe
%%topofthestackwillbecheckedfirst.Iftheheaderfile
%%isalreadyinthelist,thennothingchanges.Otherwise,
%%thelengthofthevectoratthelogical-topofthestack
%%willbeincreasedbyoneusingthenewheaderfilename.
%%
%%LibAddtoSharedUtilsIncludesVector(inputVet)
%%--Appendavectorofheaderfilenamestothelistofvectorof
%%headerfilesatthatarecurrentlyatthelogical-topofstack.
%%Repeatedheaderfilenameswillbethriftedout.Thelength
%%ofthevectoratthelogical-topofthestackwillbe
%%increaseenoughtoholdanynewheaderfilenames.Likea
%%setunionoperation.
%%
%%Usage:
%%Onthebeginingofsharedutilitiescodegeneration,wecall
%%LibPushEmptyStackSharedUtilstocreateanewrowatthelogical-topofstack
%%torecordincludefilerequirements.Astheneedforanindividualheader
%%fileisidentified,callsaremadetoLibAddtoSharedUtilsIncludestoinsert
%%thatfileintherowatthelogical-topofthestack.Attheendof
%%codegenerationforeachutility,authorsmustcallLibPopStackSharedUtilsIncludes
%%tocleanupthestackbyremovingthelogical-top.
%%Inthemiddleofgeneratingcodeforoneutility,itiscommontobegingenerating
%%anotherrequiredutility.Thestackdesignsupportthisnestedcreationof
%%utilities.
%%
%%Readingthetopofstackrequirestwofunctioncalls.Thefirstfunctionpops
%%thevectorfromthelogical-topofthestack.Asecondcallisrequiredto
%%pushthatvectorbackontothelogical-topofthestack.
%%
%%Whencodegenerationalsoreturnitsbufferintoupperlayerfunction,weneed
%%callpopfunctionfirst,thenuseLibAddtoSharedUtilsIncludesVector(inputVet)to
%%appendthepopedlayerintoheadfilelistforupperlayercodegenerationfunction.
 
 
%%Function:locGetCreatedByComment================================================================
%%Abstract:
%%HelperfunctionfunctionSLibDumpUtilsSourceCode.
%%Itreturnsstringcommenttobeusedatthetopofshared
%%utilityfilestoindicatewhocreatedtheutilityfunctions.
%%
%function locGetCreatedByComment(name)
  %if IsModelReferenceTarget() && ...
    Name == ::CompiledModel.System[GetBaseSystemIdx()].Name
    %assign comment = "* Created for model: %<::CompiledModel.Name>"
  %else
    %assign comment = "* Created for block: %<Name>"
  %endif
  %return comment
%endfunction
 
 
%%Function:SLibDumpUtilsSourceCodeAndCacheFunctionPrototype======================================
%%Abstract:
%%Writesharedutilssourcecodeintodisk,aswellasaddfunction
%%signatureintosharedutilsgeneralincludeheaderfile.Includesforthe
%%headerfilesfromthelogical-topofthestack::GlobalSharedUtilsIncludes
%%areinsertedpriortothebodyinthec-file.
%%
%%AddpragmasaroundutilityfuncPrototypeandfuncDefinition
%%Cachefunctionprototypewhenthefunctionisnotsharedutils
%%
%%Example:
%%%openfilebuffer
%%voidmyfunc(inti){
%%i++;
%%}
%%%closefilebuffer
%%%<SLibDumpUtilsSourceCodeAndCacheFunctionPrototype("myfunc","voidmyfunc(inti)",buffer)>
%%
%function SLibDumpUtilsSourceCodeAndCacheFunctionPrototype(fcnName,funcProto,buffer) void
   %<SLibDumpUtilsSourceCodeWithPrototypeIncludesAndCached(fcnName,funcProto,buffer,"")>
%endfunction
 
 
%%Function:SLibDumpUtilsSourceCodeWithPrototypeIncludesAndCached=================================
%%Abstract:
%%Writesharedutilssourcecodeintodisk,aswellasaddfunction
%%signatureintosharedutilsgeneralincludeheaderfile.Includesforthe
%%headerfilesfromthelogical-topofthestack::GlobalSharedUtilsIncludes
%%areinsertedpriortothebodyinthec-file.Andcachefunctionprototype
%%whenthefunctionisnotsharedutils
%%
%%AddpragmasaroundutilityfuncPrototypeandfuncDefinition
%%Cachefunctionprototypewhenthefunctionisnotsharedutils
%%
%%Example:
%%%openfilebuffer
%%voidmyfunc(inti){
%%i++;
%%}
%%%closefilebuffer
%%%<SLibDumpUtilsSourceCodeWithPrototypeIncludesAndCached("myfunc","voidmyfunc(inti)",buffer,"")>
%%
%function SLibDumpUtilsSourceCodeWithPrototypeIncludesAndCached(fcnName,funcProto,buffer,funcProtoIncludes) void
  %% input argument funcProto and buffer shall not have pragma
  %<SLibDumpUtilsSourceCodeWithPrototypeIncludes(fcnName,funcProto,buffer,funcProtoIncludes)>
  %if ::CompiledModel.GenUtilsSrcInSharedLocation == 0
    %assign msfcn = "MemSecFuncSharedUtil"
    %openfile fcnPrototype_pragma
    %<SLibGetFcnMemSecPragmaOnDecl(fcnName, msfcn, "Pre")>/
    %<funcProto>
    %<SLibGetFcnMemSecPragmaOnDecl(fcnName, msfcn, "Post")>/
    %closefile fcnPrototype_pragma
    %<LibCacheFunctionPrototype(fcnPrototype_pragma)>/
  %endif
%endfunction
 
%%Function:SLibDumpUtilsSourceCode===============================================================
%%Abstract:
%%Writesharedutilssourcecodeintodisk,aswellasaddfunction
%%signatureintosharedutilsgeneralincludeheaderfile.Includesforthe
%%headerfilesfromthelogical-topofthestack::GlobalSharedUtilsIncludes
%%areinsertedpriortothebodyinthec-file.
%%
%%Example:
%%%openfilebuffer
%%voidmyfunc(inti){
%%i++;
%%}
%%%closefilebuffer
%%%<SLibDumpUtilsSourceCode("myfunc","voidmyfunc(inti)",buffer)>
%%
%function SLibDumpUtilsSourceCode(fcnName,funcProto,buffer) void
    %% g1633934:Dump the header file includes if using row-major code generation and sharedutils
    %% for the logging transpose function. The transpose function includes should not be
    %% if the model is Accelerator type model
    %assign isRM = LibIsRowMajorLayout()
    %if isRM
        %if !Accelerator && !IsModelReferenceSimTarget()
            %% User top
            %openfile funcProtoIncludesTop
            %<LibDumpTopOfHdrFileUserCode()>/
            %closefile funcProtoIncludesTop
 
            %% User bottom
            %openfile funcProtoIncludesBottom
            %<LibDumpBottomOfHdrFileUserCode()>/
            %closefile funcProtoIncludesBottom
        %elseif IsModelReferenceSimTarget()
            %% User top
            %openfile funcProtoIncludesTop
            %<LibDumpTopOfHdrFileUserCode()>/
            %closefile funcProtoIncludesTop
        %endif
    %endif
    %assign funcProtoIncludes = ""
    %if EXISTS(funcProtoIncludesBottom)
        %assign funcProtoIncludes = funcProtoIncludesTop + "/n" + funcProtoIncludesBottom
    %elseif EXISTS(funcProtoIncludesTop)
        %assign funcProtoIncludes = funcProtoIncludesTop
    %endif
    %<SLibDumpUtilsSourceCodeWithPrototypeIncludes(fcnName,funcProto,buffer,funcProtoIncludes)>
%endfunction
 
%%Function:SLibAddMathIncludeForUtilsSourceCode==================================================
%%Abstract:
%%Addincludeofmath.hwhentheutilitycallsoneormoremathfunctionsusedby
%%FixedPtutilities.
%%
%function SLibAddMathIncludeForUtilsSourceCode(buffer) void
  %assign indices = FEVAL("regexp",buffer,"(ldexp|fmod|ceil|floor)")
  %if (!ISEMPTY(indices))
  %endif
%endfunction
 
%function FcnDumpSharedUtilsIncludes()
  %openfile buf
  %if SIZE(::GlobalSharedUtilsIncludes, 1) > 0
    %% read top of stack
    %assign locGSUIncludesCache = LibPopStackSharedUtilsIncludes()
    %assign nlocGSUIncludesCache = SIZE(locGSUIncludesCache,1)
    %foreach idx = nlocGSUIncludesCache
      %assign incFileName = locGSUIncludesCache[idx]
      %if incFileName[0] == "<" || incFileName[0] == "/""
        #include %<incFileName>
      %else
        #include "%<incFileName>"
      %endif
    %endforeach
    %<LibPushStackSharedUtilsIncludes(locGSUIncludesCache)>
  %endif
  %closefile buf
  %return buf
%endfunction
 
%%Function:SLibDumpUtilsSourceCodeWithPrototypeIncludes==========================================
%%Abstract:
%%Writesharedutilssourcecodeintodisk,aswellasaddfunction
%%signatureanditsincludesintosharedutilsgeneralincludeheaderfile.Includesforthe
%%headerfilesfromthelogical-topofthestack::GlobalSharedUtilsIncludes
%%areinsertedpriortothebodyinthec-file.
%%
%%Example:
%%%openfilebuffer
%%voidmyfunc(inti){
%%i++;
%%}
%%%closefilebuffer
%%%<SLibDumpUtilsSourceCodeWithPrototypeIncludes("myfunc","voidmyfunc(inti)",buffer,"")>
%%
%function SLibDumpUtilsSourceCodeWithPrototypeIncludes(fcnName,funcProto,buffer,funcProtoIncludes) void
  %if ::CompiledModel.GenUtilsSrcInSharedLocation == 1
    %if !ISFIELD(::CompiledModel, "RTWInfoMatFile")
      %<LoadRTWInfoMatFileforTLC()>
    %endif
    %assign baseFileName = "%<fcnName>"
    %assign fileName = "%<::CompiledModel.RTWInfoMatFile.sharedSourcesDir>%<fcnName>"
    %if FILE_EXISTS(fileName+"."+ ::LangFileExt) == 0
      %openfile includeBuf
      %% insert additional include files, such as
      %<FcnDumpSharedUtilsIncludes()>
      %% include self to satisfy MISRA 8.1
      #include "%<fcnName>.h"
      %closefile includeBuf
      %openfile protectedUtilityDef
      %<SLibGetFcnMemSecPragma(fcnName, "MemSecFuncSharedUtil", "Pre")>/
      %<buffer>/
      %<SLibGetFcnMemSecPragma(fcnName, "MemSecFuncSharedUtil", "Post")>/
 
      %closefile protectedUtilityDef
      %assign createdBycomment = locGetCreatedByComment(Name)
      %openfile bannerBuf
      /*
      * %<fcnName>.%<LangFileExt>
      *
      %<SLibCommonUtilHeaderInfo()>/
      %<createdBycomment>
      */
      %closefile bannerBuf
      %assign file = LibCreateSourceFileAtPath("Source","Simulink",fileName,baseFileName)
      %<SLibSetModelFileAttribute(file, "Group", "utility")>
      %<LibSetSourceFileSection(file, "Includes", includeBuf)>
      %<LibSetSourceFileSection(file, "Functions", protectedUtilityDef)>
      %<LibSetSourceFileSection(file, "Banner", bannerBuf)>
      %<SLibSetModelFileIndent(file, TLC_TRUE)>
      %<SLibSetModelFileShared(file, TLC_TRUE)>
      %% We have to defer #including the coder types files since their optimized
      %% existance can evolve during SLibGenBodyCache(), which we're in now
      %<SLibSetModelFileDeferredIncludeCoderTypes(file, TLC_TRUE)>
      %openfile includeHBuf
      #ifndef SHARE_%<fcnName>
      #define SHARE_%<fcnName>
      %assign rtwtypesBaseName = SLibGetFileNameForCode("rtwtypes_hdr")
      %assign rtwtypesFileName = rtwtypesBaseName + ".h"
      #include "%<rtwtypesFileName>"
      %assign rtwCtx = ::CompiledModel.RTWContext
      %assign isMultiword = SLibIsHostBasedSimulationTarget() ? ...
        TLC_TRUE : ...
        FEVAL("rtwprivate", "retrieveMultiWordUtilitiesAndFunctions", "%<MasterSharedCodeManagerFile>", rtwCtx, fcnName)
      %if isMultiword
        #include "%<SLibCoderMultiwordTypesFilename()>"
      %endif
 
      %if SLibDeclareHalfPrecisionUsage()
        #include "%<SLibCoderHalfTypeHdrFilename()>"
      %endif
 
      %if ("%<funcProtoIncludes>" != "")
      %<funcProtoIncludes>
      %endif
      %closefile includeHBuf
 
      %openfile fcnSignature
      %<SLibGetFcnMemSecPragmaOnDecl(fcnName, "MemSecFuncSharedUtil", "Pre")>/
      %<funcProto>
      %<SLibGetFcnMemSecPragmaOnDecl(fcnName, "MemSecFuncSharedUtil", "Post")>/
      %closefile fcnSignature
 
      %openfile fileTrailerBuf
      #endif
      %closefile fileTrailerBuf
 
      %openfile bannerBuf
      /*
      * %<fcnName>.h
      *
      %<SLibCommonUtilHeaderInfo()>/
      %<createdBycomment>
      */
      %closefile bannerBuf
 
      %assign file = LibCreateSourceFileAtPath("Header","Simulink",fileName,baseFileName)
      %<SLibSetModelFileAttribute(file, "Group", "utility")>
      %<LibSetSourceFileSection(file, "Includes", includeHBuf)>
      %<LibSetSourceFileSection(file, "Declarations", fcnSignature)>
      %<LibSetSourceFileSection(file, "UserBottom", fileTrailerBuf)>
      %<LibSetSourceFileSection(file, "Banner", bannerBuf)>
      %<SLibSetModelFileIndent(file, TLC_TRUE)>
      %<SLibSetModelFileShared(file, TLC_TRUE)>
    %else
      %<SLibAddGeneratedFileToList(fileName+ "."+ ::LangFileExt, "utility", "source","")>
      %<SLibAddGeneratedFileToList(fileName+".h", "utility", "header","")>
    %endif
  %else
    %openfile buffer_pragmas
    %<SLibGetFcnMemSecPragma(fcnName, "MemSecFuncSharedUtil", "Pre")>/
    %<buffer>/
    %<SLibGetFcnMemSecPragma(fcnName, "MemSecFuncSharedUtil", "Post")>/
 
    %closefile buffer_pragmas
    %<SLibCacheSourceCode(buffer_pragmas)>/
 
    %% Add #includes to system code since we're not generating
    %% shared utilities
    %if SIZE(::GlobalSharedUtilsIncludes, 1) > 0
      %% pop and read top of stack to get header file names
      %assign locGSUIncludesCache = LibPopStackSharedUtilsIncludes()
      %assign nlocGSUIncludesCache = SIZE(locGSUIncludesCache,1)
      %foreach idx = nlocGSUIncludesCache
        %assign incFileName = locGSUIncludesCache[idx]
        %assign system = ::CompiledModel.System[GetBaseSystemIdx()]
        %assign moduleFileTypeIdx = ::CompiledModel.MdlHeaderFileIdx
        %<FcnAppendSystemFcnHeaders(system, incFileName, moduleFileTypeIdx)>
      %endforeach
      %% push back onto the stack since we popped above
      %<LibPushStackSharedUtilsIncludes(locGSUIncludesCache)>
    %endif
 
  %endif
%endfunction
 
%%Function:SLibDumpUtilsMacro====================================================================
%%Abstract:
%%Writesharedutilsmacrointodiskas".h"headfile,aswellasaddthis
%%headfileintosharedutilsgeneralincludeheaderfile.
%%
%%Example:
%%%openfilebuffer
%%#definemymacroxyz(intx)
%%%closefilebuffer
%%%<SLibDumpUtilsMacro("mymacro",buffer)>
%%
%function SLibDumpUtilsMacro(fcnName,buffer) void
%if ::CompiledModel.GenUtilsSrcInSharedLocation == 1
  %if !ISFIELD(::CompiledModel, "RTWInfoMatFile")
      %<LoadRTWInfoMatFileforTLC()>
  %endif
  %assign fileName = "%<::CompiledModel.RTWInfoMatFile.sharedSourcesDir>%<fcnName>_MACRO.h"
  %if FILE_EXISTS("%<fileName>") == 0
    %openfile filebuffer = "%<fileName>"
    %<buffer>
    %closefile filebuffer
    %<SLibIndentFile(fileName,::CompiledModel.Name)>
  %endif
  %<SLibAddGeneratedFileToList(fileName,"utility","header","")>
%else
  %% add into _private.h
  %<LibCacheDefine(buffer)>
%endif
%endfunction
 
%function SLibAddtoTFLSharedUtilsIncludes(incFileName) void
  %%
  %% ignore empties
  %%
 
  %if incFileName == ""
    %return
  %endif
  %%
  %if !EXISTS(::TFLSharedUtilsInclude) || SIZE(::TFLSharedUtilsInclude,1)<1
    %assign ::TFLSharedUtilsInclude = []
  %endif
 
  %assign len = SIZE(::TFLSharedUtilsInclude,1)
  %% scan for duplicates, add if not on any list
  %%
  %assign duplicate = TLC_FALSE
  %foreach idx = len
    %if ::TFLSharedUtilsInclude[idx] == incFileName
      %assign duplicate = TLC_TRUE
      %break
    %endif
  %endforeach
  %if (!duplicate)
    %assign ::TFLSharedUtilsInclude = ::TFLSharedUtilsInclude + incFileName
  %endif
%endfunction
 
%%Function:LibPushStackSharedUtilsIncludes=======================================================
%%Abstract:
%%Pushvectorofheaderfilesintological-topofstack::GlobalSharedUtilsIncludes.
%%
%%Example:
%%%<LibPushStackSharedUtilsIncludes("")>topushstackanemptylayer
%%
%function LibPushStackSharedUtilsIncludes(stackVector) void
  %% as TLC doesn't support directly "+" for vector, we needs increase its size by adding
  %% an empty string first, then use assignment to "push" vector to stack
  %assign ::GlobalSharedUtilsIncludes = ::GlobalSharedUtilsIncludes + ""
  %assign nGlobalSharedUtilsIncludes = SIZE(::GlobalSharedUtilsIncludes,1)
  %assign ::GlobalSharedUtilsIncludes[nGlobalSharedUtilsIncludes-1] = stackVector
%endfunction
 
%%Function:LibPushEmptyStackSharedUtils==========================================================
%%Abstract:
%%Pushemptyvectorintological-topofstack::GlobalSharedUtilsIncludes
%%Thisincreasesdepthofstackby1.
%%
%%Example:
%%%<LibPushEmptyStackSharedUtils()>,.
%%
%function LibPushEmptyStackSharedUtils() void
  %<LibPushStackSharedUtilsIncludes("")>
%endfunction
 
%%Function:LibPopStackSharedUtilsIncludes========================================================
%%Abstract:
%%Popvectorofheaderfilesfromlogical-topofstack::GlobalSharedUtilsIncludes.
%%Itwillreturnthepoppedvector.
%%
%%Example:
%%%assigntop=LibPopStackSharedUtilsIncludes()topoptopofstack.
%%
%function LibPopStackSharedUtilsIncludes() void
  %assign nGlobalSharedUtilsIncludes = SIZE(::GlobalSharedUtilsIncludes,1)
  %if nGlobalSharedUtilsIncludes > 0
    %assign returnVet = ::GlobalSharedUtilsIncludes[nGlobalSharedUtilsIncludes-1]
    %%remove top of GlobalSharedUtilsIncludes stack
    %assign tmpBuf = []
    %foreach idx = nGlobalSharedUtilsIncludes-1
      %% By adding "" we increase its size by 1
      %assign tmpBuf = tmpBuf + ""
      %assign tmpBuf[idx] = ::GlobalSharedUtilsIncludes[idx]
    %endforeach
    %assign ::GlobalSharedUtilsIncludes = tmpBuf
  %else
    %assign returnVet = []
  %endif
  %return returnVet
%endfunction
 
%%Function:LibAddtoSharedUtilsIncludes===========================================================
%%Abstract:
%%Incrementallyaddincludefilesvectorcurrentlyatlogical-topofstack::GlobalSharedUtilsIncludes.
%%Ifthefilealreadyexistsinvector,itwon'tbeadded
%%
%%Example:
%%currentstackis['',''],after
%%%<LibAddtoSharedUtilsIncludes("include.h")>
%%currentstackbecomes['','','"include.h"']
%%
%function LibAddtoSharedUtilsIncludes(incFileName) void
  %if SIZE(::GlobalSharedUtilsIncludes,1)<1
    %<LibReportFatalError("should not get here")>
  %endif
  %%
  %% ignore empties
  %%
  %if incFileName == ""
    %return
  %endif
  %%
  %% scan for duplicates, add if not on any list
  %%
  %assign duplicate = 0
  %assign nGlobalSharedUtilsIncludes = SIZE(::GlobalSharedUtilsIncludes,1)
  %assign tmpBuf = ::GlobalSharedUtilsIncludes[nGlobalSharedUtilsIncludes-1]
  %if ISEMPTY(tmpBuf)
    %assign tmpBuf = []
  %endif
  %assign ntmpBuf = SIZE(tmpBuf,1)
  %foreach idx = ntmpBuf
    %if (tmpBuf[idx] == incFileName)
      %assign duplicate = 1
      %break
    %endif
  %endforeach
  %if (!duplicate)
      %assign tmpBuf = tmpBuf + incFileName
      %assign ::GlobalSharedUtilsIncludes[nGlobalSharedUtilsIncludes-1] = tmpBuf
  %endif
%endfunction
 
%%Function:LibAddtoSharedUtilsIncludesVector=====================================================
%%Abstract:
%%VectorversionofLibAddtoSharedUtilsIncludes.It'saddingeachelementof
%%inputvectortovectorcurrentlyatlogical-topofstack.Normally,it'susedwith
%%LibPopStackSharedUtilsIncludestocombinetwolayersofstacktogether.
%%
%%Example:
%%%assignGSUStackBuf=LibPopStackSharedUtilsIncludes()
%%%<LibAddtoSharedUtilsIncludesVector(GSUStackBuf)>
%%
%function LibAddtoSharedUtilsIncludesVector(inputVet) void
  %if TYPE(inputVet)=="Vector"
    %assign ninputVet = SIZE(inputVet,1)
    %foreach idx=ninputVet
      %<LibAddtoSharedUtilsIncludes(inputVet[idx])>
    %endforeach
  %endif
%endfunction
 
%endif %% _CACHE_SHAREDUTILS_LIB_
 
%%[EOF]cache_sharedutils_lib.tlc