| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|---|
| 3 | <title>G4InteractorMessenger.cc File Reference</title>
|
|---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css">
|
|---|
| 5 | </head><body>
|
|---|
| 6 | <!-- Generated by Doxygen 1.3.4 -->
|
|---|
| 7 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
|
|---|
| 8 | <h1>G4InteractorMessenger.cc File Reference</h1>
|
|---|
| 9 | <p>
|
|---|
| 10 | <a href="G4InteractorMessenger_8cc-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
|
|---|
| 11 | <tr><td></td></tr>
|
|---|
| 12 | <tr><td colspan=2><br><h2>Functions</h2></td></tr>
|
|---|
| 13 | <tr><td class="memItemLeft" nowrap align=right valign=top>G4bool </td><td class="memItemRight" valign=bottom><a class="el" href="G4InteractorMessenger_8cc.html#a0">GetValues</a> (G4String, int, G4String *)</td></tr>
|
|---|
| 14 |
|
|---|
| 15 | </table>
|
|---|
| 16 | <hr><h2>Function Documentation</h2>
|
|---|
| 17 | <a class="anchor" name="a0" doxytag="G4InteractorMessenger.cc::GetValues" ></a><p>
|
|---|
| 18 | <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
|---|
| 19 | <tr>
|
|---|
| 20 | <td class="mdRow">
|
|---|
| 21 | <table cellpadding="0" cellspacing="0" border="0">
|
|---|
| 22 | <tr>
|
|---|
| 23 | <td class="md" nowrap valign="top"> G4bool GetValues </td>
|
|---|
| 24 | <td class="md" valign="top">( </td>
|
|---|
| 25 | <td class="md" nowrap valign="top">G4String </td>
|
|---|
| 26 | <td class="mdname" nowrap>, </td>
|
|---|
| 27 | </tr>
|
|---|
| 28 | <tr>
|
|---|
| 29 | <td></td>
|
|---|
| 30 | <td></td>
|
|---|
| 31 | <td class="md" nowrap>int </td>
|
|---|
| 32 | <td class="mdname" nowrap>, </td>
|
|---|
| 33 | </tr>
|
|---|
| 34 | <tr>
|
|---|
| 35 | <td></td>
|
|---|
| 36 | <td></td>
|
|---|
| 37 | <td class="md" nowrap>G4String * </td>
|
|---|
| 38 | <td class="mdname" nowrap></td>
|
|---|
| 39 | </tr>
|
|---|
| 40 | <tr>
|
|---|
| 41 | <td></td>
|
|---|
| 42 | <td class="md">) </td>
|
|---|
| 43 | <td class="md" colspan="2"><code> [static]</code></td>
|
|---|
| 44 | </tr>
|
|---|
| 45 |
|
|---|
| 46 | </table>
|
|---|
| 47 | </td>
|
|---|
| 48 | </tr>
|
|---|
| 49 | </table>
|
|---|
| 50 | <table cellspacing=5 cellpadding=0 border=0>
|
|---|
| 51 | <tr>
|
|---|
| 52 | <td>
|
|---|
| 53 |
|
|---|
| 54 | </td>
|
|---|
| 55 | <td>
|
|---|
| 56 |
|
|---|
| 57 | <p>
|
|---|
| 58 |
|
|---|
| 59 | <p>
|
|---|
| 60 | Definition at line <a class="el" href="G4InteractorMessenger_8cc-source.html#l00110">110</a> of file <a class="el" href="G4InteractorMessenger_8cc-source.html">G4InteractorMessenger.cc</a>.
|
|---|
| 61 | <p>
|
|---|
| 62 | Referenced by <a class="el" href="G4InteractorMessenger_8cc-source.html#l00092">G4InteractorMessenger::SetNewValue()</a>.
|
|---|
| 63 | <p>
|
|---|
| 64 | <div class="fragment"><pre>00115 {
|
|---|
| 65 | 00116 <span class="keywordtype">char</span>* value = STRDUP(newValue.data());
|
|---|
| 66 | 00117 <span class="keywordflow">if</span>(value==NULL) <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|---|
| 67 | 00118 <span class="keywordtype">char</span>* tok = strtok(value,<span class="stringliteral">" "</span>);
|
|---|
| 68 | 00119 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i<paramn;i++ ) {
|
|---|
| 69 | 00120 <span class="keywordflow">if</span>(tok==NULL) {
|
|---|
| 70 | 00121 STRDEL(value);
|
|---|
| 71 | 00122 <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|---|
| 72 | 00123 }
|
|---|
| 73 | 00124 G4String token = tok;
|
|---|
| 74 | 00125 <span class="keywordflow">if</span>( token(0)==<span class="charliteral">'"'</span> ) {
|
|---|
| 75 | 00126 <span class="keywordflow">while</span>( token(token.length()-1) != <span class="charliteral">'"'</span> ) {
|
|---|
| 76 | 00127 tok = strtok(NULL,<span class="stringliteral">" "</span>);
|
|---|
| 77 | 00128 <span class="keywordflow">if</span>( (tok==NULL) || (*tok==<span class="charliteral">'\0'</span>)) {
|
|---|
| 78 | 00129 STRDEL(value);
|
|---|
| 79 | 00130 <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|---|
| 80 | 00131 }
|
|---|
| 81 | 00132 token += <span class="stringliteral">" "</span>;
|
|---|
| 82 | 00133 token += tok;
|
|---|
| 83 | 00134 }
|
|---|
| 84 | 00135 token = (G4String)token.strip(G4String::both,<span class="charliteral">'"'</span>);
|
|---|
| 85 | 00136 }
|
|---|
| 86 | 00137 <span class="keywordflow">if</span>( token.isNull() ) {
|
|---|
| 87 | 00138 STRDEL(value);
|
|---|
| 88 | 00139 <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|---|
| 89 | 00140 } <span class="keywordflow">else</span> {
|
|---|
| 90 | 00141 params[i] = token;
|
|---|
| 91 | 00142 }
|
|---|
| 92 | 00143 tok = strtok(NULL,<span class="stringliteral">" "</span>);
|
|---|
| 93 | 00144 }
|
|---|
| 94 | 00145 STRDEL(value);
|
|---|
| 95 | 00146 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|---|
| 96 | 00147 }
|
|---|
| 97 | </pre></div> </td>
|
|---|
| 98 | </tr>
|
|---|
| 99 | </table>
|
|---|
| 100 | <hr size="1"><address style="align: right;"><small>Generated on Fri Jun 22 11:07:03 2007 by
|
|---|
| 101 | <a href="http://www.doxygen.org/index.html">
|
|---|
| 102 | <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
|
|---|
| 103 | </a>1.3.4 </small></address>
|
|---|
| 104 | </body>
|
|---|
| 105 | </html>
|
|---|