title: How to do pointer work with accessor methods in Objective-C
body: <p>Basic problem statement:</p>
  
  <p>I have a very good reason for doing some pointer fanciness in an app where I need to pass a decimal by reference.</p>
  
  <p>So I have a class which stores many a decimal, so let's say is has a property as such:</p>
  
  <pre><code>@property (nonatomic) double myDecimalValue;
  </code></pre>
  
  <p>I want to pass it by reference to some other class.</p>
  
  <pre><code>[someOtherObject sendMyDecimalByReference:&amp;myDecimalValue];
  </code></pre>
  
  <p>But, a problem emerges! The way that actually has to be written (because it's a property) is</p>
  
  <pre><code>[someOtherObject sendMyDecimalByReference:&amp;decimalOrigin.myDecimalValue];
  </code></pre>
  
  <p>This fails to compile in objective-c</p>
  
  <p>I get around it by writing the following</p>
  
  <pre><code>- (double *) myDecimalValueRef;
  
  [someOtherObject sendMyDecimalByReference:[decimalOrigin myDecimalValue]];
  </code></pre>
  
  <p>Except I have dozens of these decimals and I don't want to write that stupid wrapper function for every value.</p>
  
  <p>Is there a shorthand way to do this in Objective-C using just the Getter functions?</p>
  
  <p>Let's just assume I have a great reason for not using NSNumber.</p>
  
  <p>Thanks!</p>