%%
%% This is file `dynamicnumber.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dynamicnumber.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2015 by Olivier Pieters
%% 
%% This file may be distributed and/or modified under the
%% conditions of the MIT License, a version can be found
%% in the GitHub repository:
%% 
%%    https://github.com/opieters/DynamicNumber
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dynamicnumber}
   [2015/10/27 v0.1.3 Dynamic Number package]
%% \DescribeMacro{\dncurrent}
\RequirePackage{pgfkeys}
\RequirePackage{xparse}
\newread\dninstream
\ExplSyntaxOn
\DeclareExpandableDocumentCommand{\@IfNoValueOrEmptyTF}{mmm}
 {
  \IfNoValueTF{#1}{#2}
   {
    \tl_if_empty:nTF {#1} {#2} {#3}
   }
 }
\ExplSyntaxOff
\DeclareDocumentCommand{\dndeclare}{m}{%
    \pgfkeys{%
        /dynamicnumber/#1/.is family,
        /dynamicnumber/#1/.unknown/.style = {%
            \pgfkeyscurrentpath/\pgfkeyscurrentname/.initial = ##1%
        }
    }%
}
\DeclareDocumentCommand{\dnsetcurrent}{m}{%
\@ifundefined{dncurrent}{%
    \DeclareDocumentCommand{\dncurrent}{}{#1}%
}
{%
\RenewDocumentCommand{\dncurrent}{}{#1}%
}%
}
\DeclareDocumentCommand{\dnload}{m}{%
    \IfFileExists{#1.dnlist}{%
        \immediate\openin\dninstream=#1.dnlist
        \@whilesw\unless\ifeof\dninstream\fi{%
            \immediate\read\dninstream to \@auxcommand
            \@auxcommand
        }%
        \immediate\closein\dninstream%
    }{}%
}
\DeclareDocumentCommand{\dnget}{O{} m}{%
\@IfNoValueOrEmptyTF{#1}{%
    \pgfkeysvalueof{/dynamicnumber/\dncurrent/#2}}{%
    \pgfkeysvalueof{/dynamicnumber/#1/#2}}%
}
\endinput
%%
%% End of file `dynamicnumber.sty'.
