LinkFactory.h

#pragma once


namespace Core
{
    ref class Link;
    ref class Joint;

    typedef array< Link^ > Links;


    /// リンクの生成 ( Factory Method Pattern )
    public ref class LinkFactory
    {
    // Construction --------------------------------------------------------
    public:
        explicit LinkFactory( System::Xml::XmlElement^ root );


    // Operation -----------------------------------------------------------
    public:
        Link^ Create();

    private:
        Link^ FactoryMethod( Joint^ joint );

        Robotics::PositionVector^ GetCenterOfGravity();
        double GetMass();


    // static
    public:
        static Links^ CreateLinks( System::Xml::XmlElement^ root );


    // Attribute ===========================================================
    private:
        System::Xml::XmlElement^ m_element;     ///< 要素

    };
}