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
|
<html>
<head>
<title>~/src/firstworks/rudiments-0.31/include/rudiments/parameterstring.h.html</title>
<meta name="Generator" content="Vim/7.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>
<font color="#0000ff">// Copyright (c) 2003 David Muse</font>
<font color="#0000ff">// See the COPYING file for more information.</font>
<font color="#a020f0">#ifndef RUDIMENTS_PARAMETERSTRING_H</font>
<font color="#a020f0">#define RUDIMENTS_PARAMETERSTRING_H</font>
<font color="#a020f0">#include </font><font color="#ff00ff"><rudiments/private/parameterstringincludes.h></font>
<font color="#0000ff">// The string class provides methods for parsing and accessing strings</font>
<font color="#0000ff">// formatted like this:</font>
<font color="#0000ff">//</font>
<font color="#0000ff">// char *string="name1=value1;name2='value2';name3=value3";</font>
<font color="#0000ff">//</font>
<font color="#0000ff">// These are often used as parameterstrings for databases or other similar</font>
<font color="#0000ff">// uses.</font>
<font color="#a020f0">#ifdef RUDIMENTS_NAMESPACE</font>
<font color="#2e8b57"><b>namespace</b></font> rudiments {
<font color="#a020f0">#endif</font>
<font color="#2e8b57"><b>class</b></font> parameterstringprivate;
<font color="#2e8b57"><b>class</b></font> parameterstring {
<font color="#a52a2a"><b>public</b></font>:
parameterstring();
~parameterstring();
<font color="#2e8b57"><b>void</b></font> setDelimiter(<font color="#2e8b57"><b>char</b></font> delim);
<font color="#2e8b57"><b>bool</b></font> parse(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string);
<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *getValue(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name);
<font color="#2e8b57"><b>void</b></font> clear();
<font color="#a020f0"> #include </font><font color="#ff00ff"><rudiments/private/parameterstring.h></font>
};
<font color="#a020f0">#ifdef RUDIMENTS_NAMESPACE</font>
}
<font color="#a020f0">#endif</font>
<font color="#a020f0">#endif</font>
</pre>
</body>
</html>
|