// Copyright (c) 2018 RISC Software GmbH
//
// This file was generated by CPACSGen from CPACS XML Schema (c) German Aerospace Center (DLR/SC).
// Do not edit, all changes are lost when files are re-generated.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <string>
#include <tixi.h>
#include <vector>
#include "tigl_internal.h"
#include "UniquePtr.h"

namespace tigl
{
class CTiglUIDManager;
class CCPACSRotor;
class CCPACSRotorcraftModel;

namespace generated
{
    // This class is used in:
    // CPACSRotorcraftModel

    // generated from /xsd:schema/xsd:complexType[793]
    /// @brief rotorsType
    /// 
    /// Rotors type, containing all the rotors (mainRotors,
    /// tailRotors, fenestrons, propellers, ...) of an rotorcraft model.
    /// 
    class CPACSRotors
    {
    public:
        TIGL_EXPORT CPACSRotors(CCPACSRotorcraftModel* parent, CTiglUIDManager* uidMgr);

        TIGL_EXPORT virtual ~CPACSRotors();

        TIGL_EXPORT CCPACSRotorcraftModel* GetParent();

        TIGL_EXPORT const CCPACSRotorcraftModel* GetParent() const;

        TIGL_EXPORT CTiglUIDManager& GetUIDManager();
        TIGL_EXPORT const CTiglUIDManager& GetUIDManager() const;

        TIGL_EXPORT virtual void ReadCPACS(const TixiDocumentHandle& tixiHandle, const std::string& xpath);
        TIGL_EXPORT virtual void WriteCPACS(const TixiDocumentHandle& tixiHandle, const std::string& xpath) const;

        TIGL_EXPORT virtual const std::vector<std::unique_ptr<CCPACSRotor>>& GetRotors() const;
        TIGL_EXPORT virtual std::vector<std::unique_ptr<CCPACSRotor>>& GetRotors();

        TIGL_EXPORT virtual CCPACSRotor& AddRotor();
        TIGL_EXPORT virtual void RemoveRotor(CCPACSRotor& ref);

    protected:
        CCPACSRotorcraftModel* m_parent;

        CTiglUIDManager* m_uidMgr;

        std::vector<std::unique_ptr<CCPACSRotor>> m_rotors;

    private:
        CPACSRotors(const CPACSRotors&) = delete;
        CPACSRotors& operator=(const CPACSRotors&) = delete;

        CPACSRotors(CPACSRotors&&) = delete;
        CPACSRotors& operator=(CPACSRotors&&) = delete;
    };
} // namespace generated

// CPACSRotors is customized, use type CCPACSRotors directly
} // namespace tigl
