Micro template library A library for building device drivers
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

67 行
6.5 KiB

  1. \hypertarget{inbuf__dev_8h}{}\section{include/utl/dev/inbuf\+\_\+dev.h File Reference}
  2. \label{inbuf__dev_8h}\index{include/utl/dev/inbuf\+\_\+dev.\+h@{include/utl/dev/inbuf\+\_\+dev.\+h}}
  3. Abstract base class interface for input buffered devices of utl.
  4. {\ttfamily \#include $<$utl/core/impl.\+h$>$}\newline
  5. {\ttfamily \#include $<$utl/core/crtp.\+h$>$}\newline
  6. {\ttfamily \#include $<$utl/dev/dev\+\_\+iterators.\+h$>$}\newline
  7. {\ttfamily \#include $<$utl/meta/meta.\+h$>$}\newline
  8. \subsection*{Classes}
  9. \begin{DoxyCompactItemize}
  10. \item
  11. class \mbox{\hyperlink{classutl_1_1inbuf__dev}{utl\+::inbuf\+\_\+dev$<$ impl\+\_\+t, data\+\_\+t, streamsize $>$}}
  12. \begin{DoxyCompactList}\small\item\em Abstract base class for input buffered devices. \end{DoxyCompactList}\item
  13. class \mbox{\hyperlink{classutl_1_1inbuf__dev_3_01virtual__tag_00_01data__t_00_01streamsize_01_4}{utl\+::inbuf\+\_\+dev$<$ virtual\+\_\+tag, data\+\_\+t, streamsize $>$}}
  14. \begin{DoxyCompactList}\small\item\em A virtual base class specialization. \end{DoxyCompactList}\item
  15. struct \mbox{\hyperlink{structutl_1_1inbuf__dev__details_1_1is__inbuf__dev__}{utl\+::inbuf\+\_\+dev\+\_\+details\+::is\+\_\+inbuf\+\_\+dev\+\_\+$<$ \+\_\+\+Tp, typename $>$}}
  16. \begin{DoxyCompactList}\small\item\em Primary template to catch any non input device types. \end{DoxyCompactList}\item
  17. struct \mbox{\hyperlink{structutl_1_1inbuf__dev__details_1_1is__inbuf__dev___3_01___tp_00_01void__t_3_01typename_01___tpc269ee3885240cc8c352f3c6b3a67cd7}{utl\+::inbuf\+\_\+dev\+\_\+details\+::is\+\_\+inbuf\+\_\+dev\+\_\+$<$ \+\_\+\+Tp, void\+\_\+t$<$ typename \+\_\+\+Tp\+::data\+\_\+type, typename \+\_\+\+Tp\+::pointer\+\_\+type, typename \+\_\+\+Tp\+::iterator, typename \+\_\+\+Tp\+::const\+\_\+iterator, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+get1\+\_\+t$<$ \+\_\+\+Tp $>$, size\+\_\+t $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+get2\+\_\+t$<$ \+\_\+\+Tp $>$, size\+\_\+t $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+begin\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::iterator $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ tryc\+\_\+begin\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::const\+\_\+iterator $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+cbegin\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::const\+\_\+iterator $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+end\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::iterator $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ tryc\+\_\+end\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::const\+\_\+iterator $>$, use\+\_\+if\+\_\+same\+\_\+t$<$ try\+\_\+cend\+\_\+t$<$ \+\_\+\+Tp $>$, typename \+\_\+\+Tp\+::const\+\_\+iterator $>$ $>$ $>$}}
  18. \begin{DoxyCompactList}\small\item\em template to catch a proper input device type \end{DoxyCompactList}\end{DoxyCompactItemize}
  19. \subsection*{Namespaces}
  20. \begin{DoxyCompactItemize}
  21. \item
  22. \mbox{\hyperlink{namespaceutl}{utl}}
  23. \begin{DoxyCompactList}\small\item\em S\+TL\textquotesingle{}s core language concepts. \end{DoxyCompactList}\item
  24. \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details}{utl\+::inbuf\+\_\+dev\+\_\+details}}
  25. \end{DoxyCompactItemize}
  26. \subsection*{Typedefs}
  27. \begin{DoxyCompactItemize}
  28. \item
  29. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a72a6469ab9ce0cba618dd0b554fc2dd2}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+get1\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().get(declval$<$ typename \+\_\+\+Tp\+::data\+\_\+type \& $>$()))
  30. \item
  31. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_af09ed69d129c33b8a6d3f79c79b8ea35}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+get2\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().get(declval$<$ typename \+\_\+\+Tp\+::data\+\_\+type $\ast$ $>$(), declval$<$ size\+\_\+t $>$()))
  32. \item
  33. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a18d5c5e879b4714f58861ad411537d53}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+begin\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().begin())
  34. \item
  35. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_adff91b885ea1831691d4619d360bb72b}{utl\+::inbuf\+\_\+dev\+\_\+details\+::tryc\+\_\+begin\+\_\+t}} = decltype(declval$<$ const \+\_\+\+Tp $>$().begin())
  36. \item
  37. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a351202ead58a98a2eaad4f3987b6170c}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+cbegin\+\_\+t}} = decltype(declval$<$ const \+\_\+\+Tp $>$().cbegin())
  38. \item
  39. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a5d4aa9d57c443c33cf08375e0c51bdd3}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+end\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().begin())
  40. \item
  41. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a858c7a1a0b1d8d0bdc91ce681aa1b996}{utl\+::inbuf\+\_\+dev\+\_\+details\+::tryc\+\_\+end\+\_\+t}} = decltype(declval$<$ const \+\_\+\+Tp $>$().begin())
  42. \item
  43. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1inbuf__dev__details_a24eae32ecbea1291607f16d92c2b029a}{utl\+::inbuf\+\_\+dev\+\_\+details\+::try\+\_\+cend\+\_\+t}} = decltype(declval$<$ const \+\_\+\+Tp $>$().cend())
  44. \end{DoxyCompactItemize}
  45. \subsection*{Variables}
  46. \textbf{ }\par
  47. \begin{DoxyCompactItemize}
  48. \item
  49. {\footnotesize template$<$typename \+\_\+\+Tp $>$ }\\constexpr bool \mbox{\hyperlink{namespaceutl_ac447a457f18a1c4dcd1dddb4c2789006}{utl\+::\+Inbuf\+\_\+dev}} = inbuf\+\_\+dev\+\_\+details\+::is\+\_\+inbuf\+\_\+dev\+\_\+ $<$\+\_\+\+Tp$>$\+::value
  50. \end{DoxyCompactItemize}
  51. \subsection{Detailed Description}
  52. Abstract base class interface for input buffered devices of utl.
  53. Copyright (C) 2018 Christos Choutouridis
  54. This program is free software\+: you can redistribute it and/or modify it under the terms of the G\+NU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  55. This program is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU Lesser General Public License for more details.
  56. You should have received a copy of the G\+NU Lesser General Public License along with this program. If not, see \href{http://www.gnu.org/licenses/}{\tt http\+://www.\+gnu.\+org/licenses/}.