\hypertarget{group__Eina__Cxx__Stringshare__Group}{}\section{Stringshare}
\label{group__Eina__Cxx__Stringshare__Group}\index{Stringshare@{Stringshare}}


C++ Binding to Eina\+\_\+\+Stringshare.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structefl_1_1eina_1_1steal__stringshare__ref__t}{efl\+::eina\+::steal\+\_\+stringshare\+\_\+ref\+\_\+t}
\begin{DoxyCompactList}\small\item\em Type for stealing the ownership of a string that was previously shared. \end{DoxyCompactList}\item 
struct \hyperlink{structefl_1_1eina_1_1stringshare}{efl\+::eina\+::stringshare}
\begin{DoxyCompactList}\small\item\em Stringshare class. \end{DoxyCompactList}\item 
struct \hyperlink{structefl_1_1eina_1_1is__contiguous__iterator_3_01stringshare_1_1const__iterator_01_4}{efl\+::eina\+::is\+\_\+contiguous\+\_\+iterator$<$ stringshare\+::const\+\_\+iterator $>$}
\begin{DoxyCompactList}\small\item\em Specialization of the default template to define the {\ttfamily stringshare\+::const\+\_\+iterator} as a contiguous iterator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_ga4000dc3d6b4143c8890d9b12d3fee57b}{efl\+::eina\+::operator==} (\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&lhs, \hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&rhs)
\begin{DoxyCompactList}\small\item\em Check if two {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} objects represent the same string. \end{DoxyCompactList}\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_ga1e961e0e5c6682ab2316a6e23f795d35}{efl\+::eina\+::operator!=} (\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&lhs, \hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&rhs)
\begin{DoxyCompactList}\small\item\em Check if two {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} objects represent different strings. \end{DoxyCompactList}\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_gad30cc5a74ee9c18c9cd81f43e9da9b1e}{efl\+::eina\+::operator==} (\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&lhs, const char $\ast$rhs)
\begin{DoxyCompactList}\small\item\em Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. \end{DoxyCompactList}\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_ga159eb4ba751eb5f915d4f6cdebf45ff6}{efl\+::eina\+::operator!=} (\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&lhs, const char $\ast$rhs)
\begin{DoxyCompactList}\small\item\em Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. \end{DoxyCompactList}\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_ga1ecc998e45035e988dec5eef43d8871d}{efl\+::eina\+::operator==} (const char $\ast$lhs, \hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&rhs)
\begin{DoxyCompactList}\small\item\em Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. \end{DoxyCompactList}\item 
bool \hyperlink{group__Eina__Cxx__Stringshare__Group_gafeb1dfb26a5621265fc2bba2edf432bf}{efl\+::eina\+::operator!=} (const char $\ast$lhs, \hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&rhs)
\begin{DoxyCompactList}\small\item\em Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_ga7cbbf5db7bf230a3af57e75a8474f59d}\label{group__Eina__Cxx__Stringshare__Group_ga7cbbf5db7bf230a3af57e75a8474f59d}} 
\hyperlink{structefl_1_1eina_1_1steal__stringshare__ref__t}{steal\+\_\+stringshare\+\_\+ref\+\_\+t} const \hyperlink{group__Eina__Cxx__Stringshare__Group_ga7cbbf5db7bf230a3af57e75a8474f59d}{efl\+::eina\+::steal\+\_\+stringshare\+\_\+ref} = \{\}
\begin{DoxyCompactList}\small\item\em Constant instance of {\ttfamily \hyperlink{structefl_1_1eina_1_1steal__stringshare__ref__t}{steal\+\_\+stringshare\+\_\+ref\+\_\+t}} for quick reference. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
C++ Binding to Eina\+\_\+\+Stringshare. 

This class allows you to store a single copy of a string, and use in multiple places throughout your program.

This is a method to reduce the number of duplicated strings kept in memory. It\textquotesingle{}s pretty common for the same strings to be dynamically allocated repeatedly between applications and libraries, especially in circumstances where you could have multiple copies of a structure that allocates the string. So rather than duplicating and freeing these strings, you request a read-\/only pointer to an existing string and only incur the overhead of a hash look-\/up.

It sounds like micro-\/optimizing, but profiling has shown this can have a significant impact as you scale the number of copies up. It improves string creation/destruction speed, reduces memory use and decreases memory fragmentation, so a win all-\/around. 

\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_ga4000dc3d6b4143c8890d9b12d3fee57b}\label{group__Eina__Cxx__Stringshare__Group_ga4000dc3d6b4143c8890d9b12d3fee57b}} 
\index{Stringshare@{Stringshare}!operator==@{operator==}}
\index{operator==@{operator==}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator==()}{operator==()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator== (\begin{DoxyParamCaption}\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{lhs,  }\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Check if two {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} objects represent the same string. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the strings of the objects are equal, {\ttfamily false} otherwise.
\end{DoxyReturn}
This operator checks if two {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} objects represent the same string. Because of the nature of the objects, this operation falls into a simple pointer comparison, since identical strings are represented by the same instance. 

References efl\+::eina\+::stringshare\+::c\+\_\+str().

\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_ga1e961e0e5c6682ab2316a6e23f795d35}\label{group__Eina__Cxx__Stringshare__Group_ga1e961e0e5c6682ab2316a6e23f795d35}} 
\index{Stringshare@{Stringshare}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator"!=()}{operator!=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator!= (\begin{DoxyParamCaption}\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{lhs,  }\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Check if two {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} objects represent different strings. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the strings of the objects are different, {\ttfamily false} otherwise.
\end{DoxyReturn}
This function essentially returns the opposite of operator==(stringshare const\& lhs, stringshare const\& rhs). \mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_gad30cc5a74ee9c18c9cd81f43e9da9b1e}\label{group__Eina__Cxx__Stringshare__Group_gad30cc5a74ee9c18c9cd81f43e9da9b1e}} 
\index{Stringshare@{Stringshare}!operator==@{operator==}}
\index{operator==@{operator==}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator==()}{operator==()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator== (\begin{DoxyParamCaption}\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{lhs,  }\item[{const char $\ast$}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the content of the {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} string is equal the content of the given string, {\ttfamily false} otherwise. 
\end{DoxyReturn}


References efl\+::eina\+::stringshare\+::c\+\_\+str().

\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_ga159eb4ba751eb5f915d4f6cdebf45ff6}\label{group__Eina__Cxx__Stringshare__Group_ga159eb4ba751eb5f915d4f6cdebf45ff6}} 
\index{Stringshare@{Stringshare}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator"!=()}{operator!=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator!= (\begin{DoxyParamCaption}\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{lhs,  }\item[{const char $\ast$}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the content of the {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} string is different from content of the given string, {\ttfamily false} otherwise. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_ga1ecc998e45035e988dec5eef43d8871d}\label{group__Eina__Cxx__Stringshare__Group_ga1ecc998e45035e988dec5eef43d8871d}} 
\index{Stringshare@{Stringshare}!operator==@{operator==}}
\index{operator==@{operator==}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator==()}{operator==()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator== (\begin{DoxyParamCaption}\item[{const char $\ast$}]{lhs,  }\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the content of the {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} string is equal the content of the given string, {\ttfamily false} otherwise. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Cxx__Stringshare__Group_gafeb1dfb26a5621265fc2bba2edf432bf}\label{group__Eina__Cxx__Stringshare__Group_gafeb1dfb26a5621265fc2bba2edf432bf}} 
\index{Stringshare@{Stringshare}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Stringshare@{Stringshare}}
\subsubsection{\texorpdfstring{operator"!=()}{operator!=()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily bool efl\+::eina\+::operator!= (\begin{DoxyParamCaption}\item[{const char $\ast$}]{lhs,  }\item[{\hyperlink{structefl_1_1eina_1_1stringshare}{stringshare} const \&}]{rhs }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Compare an {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} object with a c-\/like string. 

\begin{DoxyReturn}{Returns}
{\ttfamily true} if the content of the {\ttfamily \hyperlink{structefl_1_1eina_1_1stringshare}{eina\+::stringshare}} string is different from content of the given string, {\ttfamily false} otherwise. 
\end{DoxyReturn}
