\hypertarget{historyvarinfocopy_8f90}{}\section{gtool/gtool\+\_\+history/historyvarinfocopy.f90 File Reference}
\label{historyvarinfocopy_8f90}\index{gtool/gtool\+\_\+history/historyvarinfocopy.\+f90@{gtool/gtool\+\_\+history/historyvarinfocopy.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{historyvarinfocopy_8f90_aeafb210aac28e107883064e460c7fb72}{historyvarinfocopy1} (varinfo\+\_\+dest, varinfo\+\_\+src, err, name, dims, longname, units, xtype)
\item 
subroutine \hyperlink{historyvarinfocopy_8f90_afc38a299aab8749dd0f75ab1f82d91cd}{historyvarinfocopy2} (varinfo\+\_\+dest, varinfo\+\_\+src, err, name, dims, longname, units, xtype)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{historyvarinfocopy_8f90_aeafb210aac28e107883064e460c7fb72}\label{historyvarinfocopy_8f90_aeafb210aac28e107883064e460c7fb72}} 
\index{historyvarinfocopy.\+f90@{historyvarinfocopy.\+f90}!historyvarinfocopy1@{historyvarinfocopy1}}
\index{historyvarinfocopy1@{historyvarinfocopy1}!historyvarinfocopy.\+f90@{historyvarinfocopy.\+f90}}
\subsubsection{\texorpdfstring{historyvarinfocopy1()}{historyvarinfocopy1()}}
{\footnotesize\ttfamily subroutine historyvarinfocopy1 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history\+\_\+varinfo), intent(out)}]{varinfo\+\_\+dest,  }\item[{type(gt\+\_\+history\+\_\+varinfo), intent(in)}]{varinfo\+\_\+src,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(in), optional}]{name,  }\item[{character($\ast$), dimension(\+:), intent(in), optional, target}]{dims,  }\item[{character($\ast$), intent(in), optional}]{longname,  }\item[{character($\ast$), intent(in), optional}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype }\end{DoxyParamCaption})}



Definition at line 12 of file historyvarinfocopy.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), dc\+\_\+error\+::dc\+\_\+ealreadyinit, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, gtool\+\_\+history\+\_\+internal\+::default, dc\+\_\+trace\+::endsub(), dc\+\_\+string\+::joinchar(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
12     \textcolor{comment}{!}
13     \textcolor{comment}{!== GT\_HISTORY\_VARINFO 型変数コピー}
14     \textcolor{comment}{!}
15     \textcolor{comment}{! GT\_HISTORY\_VARINFO 型の変数 *varinfo\_src* を}
16     \textcolor{comment}{! *varinfo\_dest* にコピーします。}
17     \textcolor{comment}{! *varinfo\_src* は HistoryVarinfoCreate によって初期設定されている必要が}
18     \textcolor{comment}{! あります。}
19     \textcolor{comment}{! さらに属性を付加する場合には HistoryVarinfoAddAttr}
20     \textcolor{comment}{! を用いてください。}
21     \textcolor{comment}{!}
22     \textcolor{comment}{! *err* を与えておくと、コピーの際何らかの不具合が生じても}
23     \textcolor{comment}{! 終了せずに err が真になって返ります。}
24     \textcolor{comment}{!}
25     \textcolor{comment}{! *err* 以降の引数は、コピーの際に上書きする値です。}
26     \textcolor{comment}{!}
27     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, 
      \hyperlink{structgtool__history__types_1_1gt__history__axis}{gt\_history\_axis}, \hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}, 
      \hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}
28     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__internal}{gtool\_history\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}, 
      \hyperlink{interfacegtool__history__internal_1_1copy__attrs}{copy\_attrs}
29     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
30     \textcolor{keywordtype}{use }\hyperlink{namespacedc__present}{dc\_present}\textcolor{keywordtype}{,only}: \hyperlink{interfacedc__present_1_1present__select}{present\_select}
31     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}
32     \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}, \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}
33     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
34     \textcolor{keywordtype}{implicit none}
35     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}),\textcolor{keywordtype}{intent(out)}:: varinfo\_dest
36     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}),\textcolor{keywordtype}{intent(in)}:: varinfo\_src
37     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
38     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: name     \textcolor{comment}{! 次元変数名}
39     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: dims(:)  \textcolor{comment}{! 依存する次元}
40     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: longname \textcolor{comment}{! 次元変数の記述的名称}
41     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{structdc__units_1_1units}{units}    \textcolor{comment}{! 次元変数の単位}
42     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype    \textcolor{comment}{! 次元変数の型}
43 
44     \textcolor{keywordtype}{integer}:: i, stat
45     \textcolor{keywordtype}{character(STRING)}:: cause\_c
46     \textcolor{keywordtype}{character(TOKEN)}, \textcolor{keywordtype}{pointer} :: srcdims(:) =>null() \textcolor{comment}{! 依存する次元}
47     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryVarinfoCopy1"}
48   \textcolor{keywordflow}{continue}
49     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname)
50     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
51     cause\_c = \textcolor{stringliteral}{''}
52 
53     \textcolor{keywordflow}{if} ( .not. varinfo\_src % initialized ) \textcolor{keywordflow}{then}
54       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
55       cause\_c = \textcolor{stringliteral}{'GT\_HISTORY\_VARINFO'}
56       \textcolor{keywordflow}{goto} 999
57 \textcolor{keywordflow}{    end if}
58 
59     \textcolor{keywordflow}{if} ( varinfo\_dest % initialized ) \textcolor{keywordflow}{then}
60       stat = \hyperlink{namespacedc__error_a3302263a8c976235052a305d54572070}{dc\_ealreadyinit}
61       cause\_c = \textcolor{stringliteral}{'GT\_HISTORY\_VARINFO'}
62       \textcolor{keywordflow}{goto} 999
63 \textcolor{keywordflow}{    end if}
64 
65     varinfo\_dest % name     = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(\textcolor{stringliteral}{''}, varinfo\_src % name, name)
66     varinfo\_dest % longname = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(\textcolor{stringliteral}{''}, varinfo\_src % longname, longname)
67     varinfo\_dest % units    = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(\textcolor{stringliteral}{''}, varinfo\_src % units, 
      \hyperlink{structdc__units_1_1units}{units})
68     varinfo\_dest % xtype    = \hyperlink{interfacedc__present_1_1present__select}{present\_select}(\textcolor{stringliteral}{''}, varinfo\_src % xtype, xtype)
69 
70     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dims)) \textcolor{keywordflow}{then}
71       srcdims => dims
72     \textcolor{keywordflow}{else}
73       srcdims => varinfo\_src % dims
74 \textcolor{keywordflow}{    endif}
75 
76     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'srcdims=<%c>'}, &
77       & c1=trim(\hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(srcdims)))
78 
79     \textcolor{keyword}{allocate}(  varinfo\_dest % dims( \textcolor{keyword}{size}( srcdims ) )  )
80     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(srcdims)
81       varinfo\_dest % dims(i) = srcdims(i)
82 \textcolor{keywordflow}{    end do}
83 
84     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'varinfo\_dest %% dims=<%c>'}, &
85       & c1=trim(\hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(varinfo\_dest % dims)))
86 
87     \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}( varinfo\_src % attrs ) ) \textcolor{keywordflow}{then}
88       \textcolor{keyword}{allocate}(  varinfo\_dest % attrs( \textcolor{keyword}{size}( varinfo\_src % attrs) )  )
89       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__internal_1_1copy__attrs}{copy\_attrs}( from = varinfo\_src % attrs, &
90         &                to = varinfo\_dest % attrs, err = err)
91 \textcolor{keywordflow}{    end if}
92 
93     varinfo\_dest % initialized = .true.
94 999 \textcolor{keywordflow}{continue}
95     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
96     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyvarinfocopy_8f90_aeafb210aac28e107883064e460c7fb72_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{historyvarinfocopy_8f90_afc38a299aab8749dd0f75ab1f82d91cd}\label{historyvarinfocopy_8f90_afc38a299aab8749dd0f75ab1f82d91cd}} 
\index{historyvarinfocopy.\+f90@{historyvarinfocopy.\+f90}!historyvarinfocopy2@{historyvarinfocopy2}}
\index{historyvarinfocopy2@{historyvarinfocopy2}!historyvarinfocopy.\+f90@{historyvarinfocopy.\+f90}}
\subsubsection{\texorpdfstring{historyvarinfocopy2()}{historyvarinfocopy2()}}
{\footnotesize\ttfamily subroutine historyvarinfocopy2 (\begin{DoxyParamCaption}\item[{type(gt\+\_\+history\+\_\+varinfo), intent(out)}]{varinfo\+\_\+dest,  }\item[{type(gt\+\_\+history\+\_\+varinfo), intent(in)}]{varinfo\+\_\+src,  }\item[{logical, intent(out), optional}]{err,  }\item[{character($\ast$), intent(in), optional}]{name,  }\item[{character($\ast$), dimension(\+:), intent(in), optional, target}]{dims,  }\item[{character($\ast$), intent(in), optional}]{longname,  }\item[{character($\ast$), intent(in), optional}]{units,  }\item[{character($\ast$), intent(in), optional}]{xtype }\end{DoxyParamCaption})}



Definition at line 101 of file historyvarinfocopy.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+trace\+::dbgmessage(), and dc\+\_\+trace\+::endsub().


\begin{DoxyCode}
101     \textcolor{comment}{!}
102     \textcolor{comment}{! 使用方法は HistoryVarinfoCopy と同様です. }
103     \textcolor{comment}{!}
104     \textcolor{comment}{! Usage is same as "HistoryVarinfoCopy".}
105     \textcolor{comment}{!}
106     \textcolor{comment}{!--}
107     \textcolor{comment}{! 総称名 Copy として提供するための関数です. }
108     \textcolor{comment}{! 機能は HistoryVarinfoCopy1 と同じです. }
109     \textcolor{comment}{!++}
110     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__types}{gtool\_history\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtool__history__types_1_1gt__history}{gt\_history}, 
      \hyperlink{structgtool__history__types_1_1gt__history__axis}{gt\_history\_axis}, \hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}, 
      \hyperlink{structgtool__history__types_1_1gt__history__attr}{gt\_history\_attr}
111     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__generic}{gtool\_history\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyvarinfocopy}{historyvarinfocopy}
112     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
113     \textcolor{keywordtype}{implicit none}
114     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}),\textcolor{keywordtype}{intent(out)}:: varinfo\_dest
115     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__types_1_1gt__history__varinfo}{gt\_history\_varinfo}),\textcolor{keywordtype}{intent(in)}:: varinfo\_src
116     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
117     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: name     \textcolor{comment}{! 次元変数名}
118     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: dims(:)  \textcolor{comment}{! 依存する次元}
119     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: longname \textcolor{comment}{! 次元変数の記述的名称}
120     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{structdc__units_1_1units}{units}    \textcolor{comment}{! 次元変数の単位}
121     \textcolor{keywordtype}{character(*)} , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: xtype    \textcolor{comment}{! 次元変数の型}
122 
123     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{"HistoryVarinfoCopy2"}
124   \textcolor{keywordflow}{continue}
125     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(subname)
126     \textcolor{keyword}{call }\hyperlink{interfacegtool__history__generic_1_1historyvarinfocopy}{historyvarinfocopy}(varinfo\_dest, varinfo\_src, err, &
127       & name, dims, longname, \hyperlink{structdc__units_1_1units}{units}, xtype )
128     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(subname)
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{historyvarinfocopy_8f90_afc38a299aab8749dd0f75ab1f82d91cd_cgraph}
\end{center}
\end{figure}
