title: Law of Demeter doesn't make sense in my case
body: <p>Looking on this <a href="https://stackoverflow.com/questions/67561/do-fluent-interfaces-violate-the-law-of-demeter">answer</a> I understand that you should not copy private pointers using friendship in C++ like I did in my program:</p>
  
  <pre><code>class bar;
  
  class foo
  {
  private:
     some_smart_pointer&lt;int&gt; state;
  
  public:
     foo(int value) : state(new int(value)) {}
     friend class baz;
  };
  
  class bar
  {
  private:
     some_weak_pointer&lt;int&gt; state;
  public:
     friend class baz;
  };
  
  class baz
  {
  public:
     foo Foo;
     bar Bar;
  
     baz() { Bar.state = Foo.state; }
  };
  </code></pre>
  
  <p>That's ok but passing a constant smart pointer violates the principle of encapsulation.<br>
  It exposes the internals of the system.
  Passing bar to foo also creates coupling.
  Also in my system it makes sense to aggregate objects to what is called in that question a fluent interface:</p>
  
  <pre><code>MainObject.PropertyCollection.Property
  </code></pre>
  
  <p>As it's said in that SO answer it does not violate the Law of Demeter or does it?<br>
  I'm extremely confused here.<br>
  I'm redesigning my library for the last time and I want it to be right.<br>
  I thought that instead of passing my internal smart pointer I should pass a wrapper class that will also be used as a property and set it to read only and then copying is safe right?</p>
  
  <p>EDIT according to comments:
  Well I'm implementing the D20 3.5 SRD (<a href="http://www.d20srd.org/" rel="nofollow noreferrer">http://www.d20srd.org/</a>).<br>
  For instance there are six abilities.<br>
  In my design D20Abilities is aggregated inside D20Character.<br>
  D20Abilities contains 6 D20Ability instances: Strength, Dexterity, Constitution. Wisdom, Intelligence and Charisma.<br>
  All of the D20Ability instances hold a private state (which is called modifier) that is shared throughout the system.
  For instance each skill needs his own ability's modifier.</p>