aboutsummaryrefslogtreecommitdiffstats
path: root/doc/latex/classmeow_1_1Self.tex
blob: 9043206b78699e6d81eb13426332869cfc7eb4d4 (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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
\hypertarget{classmeow_1_1Self}{\section{meow\-:\-:Self$<$ Data $>$ Class Template Reference}
\label{classmeow_1_1Self}\index{meow\-::\-Self$<$ Data $>$@{meow\-::\-Self$<$ Data $>$}}
}


A little class use for packing the data part of another class. With this technique, it can achieve Copy-\/\-On-\/\-Write(C\-O\-R) mechanism at background and have a reference mechanism which much more flexible then the one C++ has.  




{\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 Kind of ways of duplicating. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classmeow_1_1Self_a6b39fcc4b184809f9aeaeb1c9a0bac2d}{Self} ()
\begin{DoxyCompactList}\small\item\em constructor with a real entity \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_af3220c1e1d7966c6dbaf4ec62f8cbc2f}{Self} (Data const \&d)
\begin{DoxyCompactList}\small\item\em connstructor with a real entity with it using its copy constructor \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self_afee797a10c73a1c8e02c8e6315a2930b}{Self} (\hyperlink{classmeow_1_1Self}{Self} const \&b, \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8}{Duplicate\-Type} d)
\begin{DoxyCompactList}\small\item\em constructor with given another \hyperlink{classmeow_1_1Self}{Self} \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 destructor \end{DoxyCompactList}\item 
Data const $\ast$ \hyperlink{classmeow_1_1Self_a6063551c3e6ac647500e938ade8fbc99}{operator-\/$>$} () const 
\begin{DoxyCompactList}\small\item\em Return the constant pointer to the data. \end{DoxyCompactList}\item 
Data $\ast$ \hyperlink{classmeow_1_1Self_ace312355261c68ac7531767939f5c4c2}{operator-\/$>$} ()
\begin{DoxyCompactList}\small\item\em Return the non-\/constant pointer to the data (C\-O\-R's clone might occure here. \end{DoxyCompactList}\item 
\hyperlink{classmeow_1_1Self}{Self} \& \hyperlink{classmeow_1_1Self_a5962339e9ee49312ab770f1119256ca6}{operator()} () const 
\begin{DoxyCompactList}\small\item\em Return the non-\/constant reference of {\ttfamily $\ast$this}. \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 Copy the gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} to myself. \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 myself from given {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object. \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 call {\ttfamily \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copy\-From()}} or {\ttfamily \hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{reference\-From()}} depend on your instruction \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_ab3671e44693b79e2f987f59652d46ca9}{same} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em Compare tht if the gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object is reference from the same object of me. \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_a91098e2218c358470e81d64f35d6491d}{equal} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em Compare that the data are the same. \end{DoxyCompactList}\item 
bool \hyperlink{classmeow_1_1Self_a10f22a83c3afcf65f8f9680f2a2f945c}{reference\-Less} (\hyperlink{classmeow_1_1Self}{Self} const \&s) const 
\begin{DoxyCompactList}\small\item\em Order compare by reference pointer. \end{DoxyCompactList}\item 
void \hyperlink{classmeow_1_1Self_af3277e1109c59e5f81549889b344a675}{operator=} (\hyperlink{classmeow_1_1Self}{Self} const \&a)
\begin{DoxyCompactList}\small\item\em Disallow default {\ttfamily 'operator='}. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

A little class use for packing the data part of another class. With this technique, it can achieve Copy-\/\-On-\/\-Write(C\-O\-R) mechanism at background and have a reference mechanism which much more flexible then the one C++ has. 

Sample code\-: 
\begin{DoxyCode}
\textcolor{keyword}{class }A \{
\textcolor{keyword}{private}:
  \textcolor{keyword}{struct }Myself \{
    \textcolor{keywordtype}{int} data;

    Myself() \{                               \textcolor{comment}{// Necessary}
      data = 0;
    \}

    Myself(Myself \textcolor{keyword}{const}& b): data(b.data) \{  \textcolor{comment}{// Necessary, copy constructor}
    \}

    ~Myself() \{
    \}

    \textcolor{keywordtype}{bool} operator==(Myself \textcolor{keyword}{const}& b)\textcolor{keyword}{ const }\{ \textcolor{comment}{// Optional (this method will}
                                             \textcolor{comment}{// be called only if you use}
                                             \textcolor{comment}{// Self::equal() method)}
      \textcolor{keywordflow}{return} (data == b.data);
    \}
  \};

  Self<Myself> \textcolor{keyword}{const} \textcolor{keyword}{self};          \textcolor{comment}{// Here we use 'constant' data type in }
                                    \textcolor{comment}{// order to have a coutious coding style}
                                    \textcolor{comment}{// and allow the COR mechanism to clone}
                                    \textcolor{comment}{// data only when we really want to}
                                    \textcolor{comment}{// modify them.}
\textcolor{keyword}{public}:
  A(): self() \{ \}                            \textcolor{comment}{// Default constructor}

  A(A \textcolor{keyword}{const}& a): self(a.self, \hyperlink{classmeow_1_1Self_aa7d169e9d20d590f3e571206084797f8adef1b0d02e1090b1b610a4ea91bd6730}{COPY\_FROM}) \{ \} \textcolor{comment}{// Copy constructor. You must}
                                             \textcolor{comment}{// tell me which way of}
                                             \textcolor{comment}{// duplicating should I use.}
                                             \textcolor{comment}{// It strongly recommended you}
                                             \textcolor{comment}{// use COYP\_FROM for keeping the}
                                             \textcolor{comment}{// C++'s original behavior.}
  ~A() \{ \}

  \textcolor{keywordtype}{int} getMemember(\textcolor{keywordtype}{int} wh)\textcolor{keyword}{ const }\{
    \textcolor{keywordflow}{return} \textcolor{keyword}{self}->data;   \textcolor{comment}{// Use 'operator->()' to get the pointer of the data}
                         \textcolor{comment}{// The pointer is constant or not will depend on}
                         \textcolor{comment}{// whether the left side variable of '->' is}
                         \textcolor{comment}{// constant or not.}
                         \textcolor{comment}{// If we just want to read the data, use}
                         \textcolor{comment}{// 'self' instead of 'self()'}
  \}
  \textcolor{keywordtype}{void} setMemeber(\textcolor{keywordtype}{int} k) \{
    \textcolor{keyword}{self}()->data = k;    \textcolor{comment}{// As a result of 'self()' returning a non-constant}
                         \textcolor{comment}{// reference of itself, here we get the permission}
                         \textcolor{comment}{// for modiying data.}
                         \textcolor{comment}{// So now we can observe that if you type}
                         \textcolor{comment}{// 'Self<Myself> self' instead of the one above,}
                         \textcolor{comment}{// 'self' and 'self()' will become the same one and}
                         \textcolor{comment}{// both of them allow you using '->' for getting}
                         \textcolor{comment}{// writing permission. At the same time, the COR}
                         \textcolor{comment}{// machanism will become useless because everytime}
                         \textcolor{comment}{// you want to access the date, Self will copy the}
                         \textcolor{comment}{// data to prevent you to modify it no matter that}
                         \textcolor{comment}{// you might just want to read it.}
  \}

  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}{// If you really like to use operator=, it}
                             \textcolor{comment}{// strongly recommended you use 'copyFrom()' for}
                             \textcolor{comment}{// keeping C++'s original behavior.}
    \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copyFrom}(b);
  \}
\};
\end{DoxyCode}
 Note that '\hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{reference\-From()}' will cause the two object become the same one, Which means that if you do something like '{\ttfamily a.\-reference\-From(b)}; {\ttfamily a.\-copy\-From(c)}; ', the result is that the value of {\ttfamily a},b,c will all the same one.

\begin{DoxyAuthor}{Author}
cathook
\end{DoxyAuthor}
\begin{DoxyWarning}{Warning}
This class disabled the method {\ttfamily operator=} and copy constructor in order to prevent upexplicit default behavior, so if you want to have one of them (or both), you must implement yourself 
\end{DoxyWarning}


Definition at line 104 of file Self.\-h.



\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}


Kind of ways of duplicating. 

\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}
}]Normal copy operation. \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}
}]By reference, much like pointer's copy operation. \end{description}
\end{Desc}


Definition at line 109 of file Self.\-h.



\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 with a real entity 



Definition at line 173 of file Self.\-h.

\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 with a real entity with it using its copy constructor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em d} & Inital data \\
\hline
\end{DoxyParams}


Definition at line 181 of file Self.\-h.

\hypertarget{classmeow_1_1Self_afee797a10c73a1c8e02c8e6315a2930b}{\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}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classmeow_1_1Self_afee797a10c73a1c8e02c8e6315a2930b}


constructor with given another \hyperlink{classmeow_1_1Self}{Self} 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em b} & Another \hyperlink{classmeow_1_1Self}{Self} object. \\
\hline
\mbox{\tt in}  & {\em d} & To indicate type of way of duplicating \\
\hline
\end{DoxyParams}


Definition at line 190 of file Self.\-h.

\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}


destructor 



Definition at line 206 of file Self.\-h.



\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}


Copy the gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} to myself. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this 
\end{DoxyReturn}


Definition at line 233 of file Self.\-h.

\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}


call {\ttfamily \hyperlink{classmeow_1_1Self_a9cd016a38a09f479fe2ed83eb1ebdae2}{copy\-From()}} or {\ttfamily \hyperlink{classmeow_1_1Self_a63e1570c927c7fa3b95b71fe978e355d}{reference\-From()}} depend on your instruction 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object \\
\hline
\mbox{\tt in}  & {\em t} & instruction \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this 
\end{DoxyReturn}


Definition at line 262 of file Self.\-h.

\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}


Compare that the data are the same. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & another {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true} if the data are same.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This will need the method 'Data\-::equal()' 
\end{DoxyNote}


Definition at line 289 of file Self.\-h.

\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}


Return the non-\/constant reference of {\ttfamily $\ast$this}. 



Definition at line 223 of file Self.\-h.

\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}


Return the constant pointer to the data. 



Definition at line 211 of file Self.\-h.

\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}


Return the non-\/constant pointer to the data (C\-O\-R's clone might occure here. 



Definition at line 218 of file Self.\-h.

\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}


Disallow default {\ttfamily 'operator='}. 

\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 myself from given {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & given {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$\ast$this 
\end{DoxyReturn}


Definition at line 246 of file Self.\-h.

\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}


Order compare by reference pointer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & another {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object \\
\hline
\end{DoxyParams}


Definition at line 299 of file Self.\-h.

\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}


Compare tht if the gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object is reference from the same object of me. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & gived {\ttfamily \hyperlink{classmeow_1_1Self}{Self}} object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily true} if we are referenced to the same object. 
\end{DoxyReturn}


Definition at line 277 of file Self.\-h.



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