title: Swig : typemap(in) VS typemap(out) : differences
body: <p>Only few days were given to me to deal with Swig and to wrap nice C specific creatures.</p>
  
  <p>I'm reading the Swig documentation for wrapping into Java, that I can't judge if it is not good enough or if I'm stupid enough, finally maybe because I'm Java enough, but not C/C++ enough. So, pity a Java developer that I am.</p>
  
  <p><strong>First :</strong></p>
  
  <p>What is the difference between :</p>
  
  <ol>
  <li>typemap(in) and typemap(out)?</li>
  <li>typemap(in) and typemap(directorin)?</li>
  </ol>
  
  <p>I would appreciate clear explainations ( and that fits my modest intelligence) such as :</p>
  
  <ul>
  <li>if you have this in C/C++ and you want to get this in Java, use this in Swig...</li>
  <li>using $input would mean in typemap(in)..., when $result would mean ..., when $1, $2, .. would mean...</li>
  <li>using $result would mean in typemap(out), when $input would mean ..., when $1, $2, .. would mean...</li>
  <li>using $result would mean in typemap(directorin), when $input would mean ..., when $1, $2, .. would mean...</li>
  </ul>
  
  <p><strong>Second :</strong></p>
  
  <p>Can you please give an example to wrap a structure in C?</p>