File: bad_expression.html

package info (click to toggle)
boost 1.32.0-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 93,952 kB
  • ctags: 128,458
  • sloc: cpp: 492,477; xml: 52,125; python: 13,519; ansic: 13,013; sh: 1,773; yacc: 853; makefile: 526; perl: 418; lex: 110; csh: 6
file content (77 lines) | stat: -rw-r--r-- 3,338 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
   <head>
      <title>Boost.Regex: bad_expression</title>
      <meta name="generator" content="HTML Tidy, see www.w3.org">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <link rel="stylesheet" type="text/css" href="../../../boost.css">
   </head>
   <body>
      <p></p>
      <table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
         <tr>
            <td valign="top" width="300">
               <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../boost.png" border="0"></a></h3>
            </td>
            <td width="353">
               <h1 align="center">Boost.Regex</h1>
               <h2 align="center">class bad_expression</h2>
            </td>
            <td width="50">
               <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
            </td>
         </tr>
      </table>
      <br>
      <br>
      <hr>
      <h3>Synopsis</h3>
      <p>#include &lt;<a href="../../../boost/regex/pattern_except.hpp">boost/pattern_except.hpp</a>&gt;</p>
      <p>The class <code>bad_expression</code> defines the type of objects thrown as 
         exceptions to report errors during the conversion from a string representing a 
         regular expression to a finite state machine.&nbsp;&nbsp;</p>
      <pre>
<b>namespace</b> boost{

<b>class</b> bad_pattern : <b>public</b> std::runtime_error
{
<b>public</b>:
   <b>explicit</b> bad_pattern(<b>const</b> std::string&amp; s) : std::runtime_error(s){};
};

<b>class</b> bad_expression : <b>public</b> bad_pattern
{
<b>public</b>:
   bad_expression(<b>const</b> std::string&amp; s) : bad_pattern(s) {}
};


} // namespace boost
</pre>
      <h3>Description</h3>
      <pre>
bad_expression(const string&amp; what_arg);
</pre>
      <p><b>Effects:</b> Constructs an object of class <code>bad_expression</code>.</p>
      <b></b>
      <p><b>Postcondition:</b> <code>strcmp(what(), what_arg.c_str()) == 0</code>.</p>
      <p>Footnotes: the class <i>bad_pattern</i> forms the base class for all 
         pattern-matching exceptions, of which <i>bad_expression</i> is one. The choice 
         of <i>std::runtime_error</i> as the base class for <i>bad_pattern</i> is moot; 
         depending upon how the library is used exceptions may be either logic errors 
         (programmer supplied expressions) or run time errors (user supplied 
         expressions).</p>
      <p></p>
      <hr>
      <p>Revised 
         <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> 
         24 Oct 2003 
         <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
      <p><i> Copyright John Maddock&nbsp;1998- 
            <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 
            2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
      <P><I>Use, modification and distribution are subject to the Boost Software License, 
            Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
            or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
   </body>
</html>