aboutsummaryrefslogtreecommitdiffstats
path: root/doc/latex/classmeow_1_1Self.tex
blob: 5b60f6cfdfce5935619546fda2f66c951d71a31c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
\hypertarget{classmeow_1_1Self}{\section{meow\-:\-:Self$<$ Data $>$ Class Template Reference}
\label{classmeow_1_1Self}\index{meow\-::\-Self$<$ Data $>$@{meow\-::\-Self$<$ Data $>$}}
}


具有copy on write, 且擁有比\-C++更靈活的reference機制  




{\ttfamily \#include \char`\"{}Self.\-h\char`\"{}}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}{Duplicate\-Type} \{ \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M}, 
\hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8a40c8a3eba568e04a5ce09ee0fa881822}{R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M}
 \}
\begin{DoxyCompactList}\small\item\em 複製資料的方法 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classmeow_1_1Self_a6b39fcc4b184809f9aeaeb1c9a0bac2d}{Self} ()
\begin{DoxyCompactList}\small\item\em constructor, 並宣告一個實體 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_af3220c1e1d7966c6dbaf4ec62f8cbc2f}{Self} (Data const \&d)
\begin{DoxyCompactList}\small\item\em connstructor, 宣告一個實體, 其中該實體的constructor用copy constructor \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_af98a65e83bb96c0860d91a5013b269ef}{Self} (\hyperlink{classmeow_1_1Self}{Self} const \&b, \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}{Duplicate\-Type} d=\hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M})
\begin{DoxyCompactList}\small\item\em constructor, 使用給定的\-Self當作init value, 並且可以指定要用 reference還是copy \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_a000ede7e217c31401cc0a4b1c6749ee5}{Self} (\hyperlink{classmeow_1_1Self}{Self} const \&b)
\begin{DoxyCompactList}\small\item\em Disallow copy constructor. \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_ada16564a03665b10810a6342d61044bc}{$\sim$\-Self} ()
\begin{DoxyCompactList}\small\item\em 解構子 \end{DoxyCompactList}\item 
Data const $\ast$ \hyperlink{classmeow_1_1Self_a6063551c3e6ac647500e938ade8fbc99}{operator-\/$>$} () const 
\begin{DoxyCompactList}\small\item\em 回傳指向 Data const 的指標 \end{DoxyCompactList}\item 
Data $\ast$ \hyperlink{classmeow_1_1Self_ace312355261c68ac7531767939f5c4c2}{operator-\/$>$} ()
\begin{DoxyCompactList}\small\item\em 回傳指向 Data 的指標, 如有需要, 這邊會做資料的duplicate \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self}{Self} \& \hyperlink{classmeow_1_1Self_a5962339e9ee49312ab770f1119256ca6}{operator()} () const 
\begin{DoxyCompactList}\small\item\em 回傳非const型態的自己 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self}{Self} const \& \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copy\-From} (\hyperlink{classmeow_1_1Self}{Self} const \&s)
\begin{DoxyCompactList}\small\item\em 將給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 的資料複製到自己這裡 \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self}{Self} const \& \hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{reference\-From} (\hyperlink{classmeow_1_1Self}{Self} const \&s)
\begin{DoxyCompactList}\small\item\em 將自己reference 到給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self}{Self} const \& \hyperlink{classmeow_1_1Self_ae4256bfc598bb0db76141ffce506806e}{duplicate\-From} (\hyperlink{classmeow_1_1Self}{Self} const \&s, \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}{Duplicate\-Type} t)
\begin{DoxyCompactList}\small\item\em 依據給定\-Duplicate\-Type選擇要呼叫copy\-From還是reference\-From \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_ab3671e44693b79e2f987f59652d46ca9}{same} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em 比對兩個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 是否指向同一個reference \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_a91098e2218c358470e81d64f35d6491d}{equal} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em 比對兩個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 的內容是否一樣 \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_a10f22a83c3afcf65f8f9680f2a2f945c}{reference\-Less} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em 以reference作為判斷依據的小於判斷 \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1Self_af3277e1109c59e5f81549889b344a675}{operator=} (\hyperlink{classmeow_1_1Self}{Self} const \&a)
\begin{DoxyCompactList}\small\item\em{\ttfamily operator=} 給disable掉 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Data$>$class meow\-::\-Self$<$ Data $>$}

具有copy on write, 且擁有比\-C++更靈活的reference機制 

使用上就是把所有成員變數包到一個class/structure裡, 送給\-Self \par
 例如以下 
\begin{DoxyCode}
\textcolor{keyword}{class }A \{
\textcolor{keyword}{private}:
  \textcolor{keyword}{struct }Myself \{
    \textcolor{keywordtype}{int} data;
    Myself() \{                               \textcolor{comment}{// 必要}
      data = 0;
    \}
    Myself(Myself \textcolor{keyword}{const}& b): data(b.data) \{  \textcolor{comment}{// 必要, copy constructor}
    \}
    ~Myself() \{
    \}
    \textcolor{keywordtype}{bool} operator==(Myself \textcolor{keyword}{const}& b)\textcolor{keyword}{ const }\{ \textcolor{comment}{// 不一定需要(有用到equal()才要)}
      \textcolor{keywordflow}{return} (data == b.data);
    \}
  \};

  Self<Myself> \textcolor{keyword}{const} \textcolor{keyword}{self};
\textcolor{keyword}{public}:
  A(): self() \{ \}                                \textcolor{comment}{// 預設呼叫Myself()}
  A(A \textcolor{keyword}{const}& a): self(a.self, \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}{COPY\_FROM}) \{ \}     \textcolor{comment}{// 用Myself(b)做到copyFrom}
  ~A() \{ \}
  \textcolor{keywordtype}{void} setMemeber(\textcolor{keywordtype}{int} k) \{
    \textcolor{keyword}{self}()->data = k;  \textcolor{comment}{// self()->?? 可以有write權限}
  \}
  \textcolor{keywordtype}{int} getMemember(\textcolor{keywordtype}{int} wh)\textcolor{keyword}{ const }\{
    \textcolor{keywordflow}{return} \textcolor{keyword}{self}->data; \textcolor{comment}{// self->?? 只有const}
  \}
  A \hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{referenceFrom}(A \textcolor{keyword}{const}& a) \{
    \textcolor{keyword}{self}.\hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{referenceFrom}(a.self);
  \}
  A \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copyFrom}(A \textcolor{keyword}{const}& a) \{
    \textcolor{keyword}{self}.\hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copyFrom}(a.self);
  \}
  A& \hyperlink{classmeow_1_1Self_af3277e1109c59e5f81549889b344a675}{operator=}(A \textcolor{keyword}{const}& b) \{ \textcolor{comment}{// for std::swap}
    \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copyFrom}(b);
  \}
\};
\end{DoxyCode}


\begin{DoxyAuthor}{Author}
cathook
\end{DoxyAuthor}
\begin{DoxyWarning}{Warning}
{\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 這個class會把{\ttfamily operator=} 給disable掉, 所以使用它當 kernel的class預設的 {\ttfamily operator=} 都會無法使用 
\end{DoxyWarning}


\subsection{Member Enumeration Documentation}
\hypertarget{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}{\index{meow\-::\-Self@{meow\-::\-Self}!Duplicate\-Type@{Duplicate\-Type}}
\index{Duplicate\-Type@{Duplicate\-Type}!meow::Self@{meow\-::\-Self}}
\subsubsection[{Duplicate\-Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ enum {\bf meow\-::\-Self\-::\-Duplicate\-Type}}}\label{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}


複製資料的方法 

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M@{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M}!meow\-::\-Self@{meow\-::\-Self}}\index{meow\-::\-Self@{meow\-::\-Self}!C\-O\-P\-Y\-\_\-\-F\-R\-O\-M@{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M}}\item[{\em 
\hypertarget{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}{C\-O\-P\-Y\-\_\-\-F\-R\-O\-M}\label{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}
}]跟一般的複製一樣 \index{R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M@{R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M}!meow\-::\-Self@{meow\-::\-Self}}\index{meow\-::\-Self@{meow\-::\-Self}!R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M@{R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M}}\item[{\em 
\hypertarget{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8a40c8a3eba568e04a5ce09ee0fa881822}{R\-E\-F\-E\-R\-E\-N\-C\-E\-\_\-\-F\-R\-O\-M}\label{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8a40c8a3eba568e04a5ce09ee0fa881822}
}]參照, 執行完兩個\-Self會完全等效 \end{description}
\end{Desc}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classmeow_1_1Self_a6b39fcc4b184809f9aeaeb1c9a0bac2d}{\index{meow\-::\-Self@{meow\-::\-Self}!Self@{Self}}
\index{Self@{Self}!meow::Self@{meow\-::\-Self}}
\subsubsection[{Self}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf meow\-::\-Self}$<$ Data $>$\-::{\bf Self} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a6b39fcc4b184809f9aeaeb1c9a0bac2d}


constructor, 並宣告一個實體 

\hypertarget{classmeow_1_1Self_af3220c1e1d7966c6dbaf4ec62f8cbc2f}{\index{meow\-::\-Self@{meow\-::\-Self}!Self@{Self}}
\index{Self@{Self}!meow::Self@{meow\-::\-Self}}
\subsubsection[{Self}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf meow\-::\-Self}$<$ Data $>$\-::{\bf Self} (
\begin{DoxyParamCaption}
\item[{Data const \&}]{d}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_af3220c1e1d7966c6dbaf4ec62f8cbc2f}


connstructor, 宣告一個實體, 其中該實體的constructor用copy constructor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em d} & Inital data \\
\hline
\end{DoxyParams}
\hypertarget{classmeow_1_1Self_af98a65e83bb96c0860d91a5013b269ef}{\index{meow\-::\-Self@{meow\-::\-Self}!Self@{Self}}
\index{Self@{Self}!meow::Self@{meow\-::\-Self}}
\subsubsection[{Self}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf meow\-::\-Self}$<$ Data $>$\-::{\bf Self} (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{b, }
\item[{{\bf Duplicate\-Type}}]{d = {\ttfamily {\bf C\-O\-P\-Y\-\_\-\-F\-R\-O\-M}}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_af98a65e83bb96c0860d91a5013b269ef}


constructor, 使用給定的\-Self當作init value, 並且可以指定要用 reference還是copy 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em b} & 給定的\-Self \\
\hline
\mbox{\tt in}  & {\em d} & 指定要用copy還是reference \\
\hline
\end{DoxyParams}
\hypertarget{classmeow_1_1Self_a000ede7e217c31401cc0a4b1c6749ee5}{\index{meow\-::\-Self@{meow\-::\-Self}!Self@{Self}}
\index{Self@{Self}!meow::Self@{meow\-::\-Self}}
\subsubsection[{Self}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf meow\-::\-Self}$<$ Data $>$\-::{\bf Self} (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{b}
\end{DoxyParamCaption}
)}}\label{classmeow_1_1Self_a000ede7e217c31401cc0a4b1c6749ee5}


Disallow copy constructor. 

\hypertarget{classmeow_1_1Self_ada16564a03665b10810a6342d61044bc}{\index{meow\-::\-Self@{meow\-::\-Self}!$\sim$\-Self@{$\sim$\-Self}}
\index{$\sim$\-Self@{$\sim$\-Self}!meow::Self@{meow\-::\-Self}}
\subsubsection[{$\sim$\-Self}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf meow\-::\-Self}$<$ Data $>$\-::$\sim${\bf Self} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_ada16564a03665b10810a6342d61044bc}


解構子 



\subsection{Member Function Documentation}
\hypertarget{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{\index{meow\-::\-Self@{meow\-::\-Self}!copy\-From@{copy\-From}}
\index{copy\-From@{copy\-From}!meow::Self@{meow\-::\-Self}}
\subsubsection[{copy\-From}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf Self} const\& {\bf meow\-::\-Self}$<$ Data $>$\-::copy\-From (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}


將給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 的資料複製到自己這裡 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 給定的{\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this
\end{DoxyReturn}
\begin{DoxyNote}{Note}
與reference的差別是, copy之後若該給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 有資料修改, this 這邊 {\bfseries 不會} 被改到 
\end{DoxyNote}
\hypertarget{classmeow_1_1Self_ae4256bfc598bb0db76141ffce506806e}{\index{meow\-::\-Self@{meow\-::\-Self}!duplicate\-From@{duplicate\-From}}
\index{duplicate\-From@{duplicate\-From}!meow::Self@{meow\-::\-Self}}
\subsubsection[{duplicate\-From}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf Self} const\& {\bf meow\-::\-Self}$<$ Data $>$\-::duplicate\-From (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s, }
\item[{{\bf Duplicate\-Type}}]{t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_ae4256bfc598bb0db76141ffce506806e}


依據給定\-Duplicate\-Type選擇要呼叫copy\-From還是reference\-From 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\mbox{\tt in}  & {\em t} & 給定的 {\ttfamily Duplicate\-Type} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this 
\end{DoxyReturn}
\hypertarget{classmeow_1_1Self_a91098e2218c358470e81d64f35d6491d}{\index{meow\-::\-Self@{meow\-::\-Self}!equal@{equal}}
\index{equal@{equal}!meow::Self@{meow\-::\-Self}}
\subsubsection[{equal}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ bool {\bf meow\-::\-Self}$<$ Data $>$\-::equal (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a91098e2218c358470e81d64f35d6491d}


比對兩個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 的內容是否一樣 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 另一個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true/false} 表示兩個內容是否一樣
\end{DoxyReturn}
\begin{DoxyNote}{Note}
需要用到 Data的equal() 
\end{DoxyNote}
\hypertarget{classmeow_1_1Self_a5962339e9ee49312ab770f1119256ca6}{\index{meow\-::\-Self@{meow\-::\-Self}!operator()@{operator()}}
\index{operator()@{operator()}!meow::Self@{meow\-::\-Self}}
\subsubsection[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf Self}\& {\bf meow\-::\-Self}$<$ Data $>$\-::operator() (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a5962339e9ee49312ab770f1119256ca6}


回傳非const型態的自己 

\hypertarget{classmeow_1_1Self_a6063551c3e6ac647500e938ade8fbc99}{\index{meow\-::\-Self@{meow\-::\-Self}!operator-\/$>$@{operator-\/$>$}}
\index{operator-\/$>$@{operator-\/$>$}!meow::Self@{meow\-::\-Self}}
\subsubsection[{operator-\/$>$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ Data const$\ast$ {\bf meow\-::\-Self}$<$ Data $>$\-::operator-\/$>$ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a6063551c3e6ac647500e938ade8fbc99}


回傳指向 Data const 的指標 

\hypertarget{classmeow_1_1Self_ace312355261c68ac7531767939f5c4c2}{\index{meow\-::\-Self@{meow\-::\-Self}!operator-\/$>$@{operator-\/$>$}}
\index{operator-\/$>$@{operator-\/$>$}!meow::Self@{meow\-::\-Self}}
\subsubsection[{operator-\/$>$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ Data$\ast$ {\bf meow\-::\-Self}$<$ Data $>$\-::operator-\/$>$ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_ace312355261c68ac7531767939f5c4c2}


回傳指向 Data 的指標, 如有需要, 這邊會做資料的duplicate 

\hypertarget{classmeow_1_1Self_af3277e1109c59e5f81549889b344a675}{\index{meow\-::\-Self@{meow\-::\-Self}!operator=@{operator=}}
\index{operator=@{operator=}!meow::Self@{meow\-::\-Self}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ void {\bf meow\-::\-Self}$<$ Data $>$\-::operator= (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{a}
\end{DoxyParamCaption}
)}}\label{classmeow_1_1Self_af3277e1109c59e5f81549889b344a675}{\ttfamily operator=} 給disable掉 

\hypertarget{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{\index{meow\-::\-Self@{meow\-::\-Self}!reference\-From@{reference\-From}}
\index{reference\-From@{reference\-From}!meow::Self@{meow\-::\-Self}}
\subsubsection[{reference\-From}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ {\bf Self} const\& {\bf meow\-::\-Self}$<$ Data $>$\-::reference\-From (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}


將自己reference 到給定的 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 給定的{\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this
\end{DoxyReturn}
\begin{DoxyNote}{Note}
把reference想像成指標會比較容易思考, 譬如 {\ttfamily a.\-reference\-From(b)} {\ttfamily b.\-reference\-From(c)} 相當於 {\bfseries a指向b原本指的記憶體位置}, {\bfseries b指向c原本指的記憶體位置} , 之後更動c時, 只有b會被牽連 
\end{DoxyNote}
\hypertarget{classmeow_1_1Self_a10f22a83c3afcf65f8f9680f2a2f945c}{\index{meow\-::\-Self@{meow\-::\-Self}!reference\-Less@{reference\-Less}}
\index{reference\-Less@{reference\-Less}!meow::Self@{meow\-::\-Self}}
\subsubsection[{reference\-Less}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ bool {\bf meow\-::\-Self}$<$ Data $>$\-::reference\-Less (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_a10f22a83c3afcf65f8f9680f2a2f945c}


以reference作為判斷依據的小於判斷 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 另一個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true/false} 表示自己是否小於另一個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 
\end{DoxyReturn}
\hypertarget{classmeow_1_1Self_ab3671e44693b79e2f987f59652d46ca9}{\index{meow\-::\-Self@{meow\-::\-Self}!same@{same}}
\index{same@{same}!meow::Self@{meow\-::\-Self}}
\subsubsection[{same}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Data$>$ bool {\bf meow\-::\-Self}$<$ Data $>$\-::same (
\begin{DoxyParamCaption}
\item[{{\bf Self}$<$ Data $>$ const \&}]{s}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_ab3671e44693b79e2f987f59652d46ca9}


比對兩個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} 是否指向同一個reference 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & 另一個 {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true/false} 表示是否為同一個reference 
\end{DoxyReturn}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
meowpp/\hyperlink{Self_8h}{Self.\-h}\end{DoxyCompactItemize}