text: // MusicXML Class Library
  // Copyright (c) by Matthew James Briggs
  // Distributed under the MIT License
  
  #include "mx/core/elements/Dot.h"
  #include "mx/core/FromXElement.h"
  #include <iostream>
  
  namespace mx
  {
      namespace core
      {
          Dot::Dot()
          :ElementInterface()
          ,myAttributes( std::make_shared<EmptyPlacementAttributes>() )
          {}
  
  
          bool Dot::hasAttributes() const
          {
              return myAttributes->hasValues();
          }
  
  
          bool Dot::hasContents() const  { return false; }
          std::ostream& Dot::streamAttributes( std::ostream& os ) const
          {
              if ( myAttributes )
              {
                  myAttributes->toStream( os );
              }
              return os;
          }
  
  
          std::ostream& Dot::streamName( std::ostream& os ) const  { os << "dot"; return os; }
          std::ostream& Dot::streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const
          {
              MX_UNUSED( indentLevel );
              isOneLineOnly = true;
              return os;
          }
  
  
          EmptyPlacementAttributesPtr Dot::getAttributes() const
          {
              return myAttributes;
          }
  
  
          void Dot::setAttributes( const EmptyPlacementAttributesPtr& value )
          {
              if ( value )
              {
                  myAttributes = value;
              }
          }
  
  
          bool Dot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement )
          {
              return myAttributes->fromXElement( message, xelement );
          }
  
      }
  }
  