/*
 Do not modify, auto-generated by classes.py

 Copyright 2019 Alain Dargelas

 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.
 */

/*
 * File:   design.h
 * Author:
 *
 * Created on December 14, 2019, 10:03 PM
 */

#ifndef UHDM_DESIGN_H
#define UHDM_DESIGN_H

#include <uhdm/sv_vpi_user.h>
#include <uhdm/uhdm_vpi_user.h>

#include <uhdm/containers.h>
#include <uhdm/BaseClass.h>

#include "parameters.h"


namespace UHDM {


class design final : public BaseClass {
  UHDM_IMPLEMENT_RTTI(design, BaseClass)
public:
  // Implicit constructor used to initialize all members,
  // comment: design();
  virtual ~design() final = default;

  bool VpiElaborated() const { return vpiElaborated_; }
  bool VpiElaborated(bool data) {
    vpiElaborated_ = data;
    return true;
  }

  virtual bool VpiName(std::string_view data) final;
  virtual std::string_view VpiName() const final;

  uint32_t VpiType() const final { return vpiDesign; }

  VectorOfinclude_file_info* Include_file_infos() const { return include_file_infos_; }
  bool Include_file_infos(VectorOfinclude_file_info* data) {
    include_file_infos_ = data;
    return true;
  }

  VectorOfpackage* AllPackages() const { return allPackages_; }
  bool AllPackages(VectorOfpackage* data) {
    allPackages_ = data;
    return true;
  }

  VectorOfpackage* TopPackages() const { return topPackages_; }
  bool TopPackages(VectorOfpackage* data) {
    topPackages_ = data;
    return true;
  }

  VectorOfclass_defn* AllClasses() const { return allClasses_; }
  bool AllClasses(VectorOfclass_defn* data) {
    allClasses_ = data;
    return true;
  }

  VectorOfinterface_inst* AllInterfaces() const { return allInterfaces_; }
  bool AllInterfaces(VectorOfinterface_inst* data) {
    allInterfaces_ = data;
    return true;
  }

  VectorOfudp_defn* AllUdps() const { return allUdps_; }
  bool AllUdps(VectorOfudp_defn* data) {
    allUdps_ = data;
    return true;
  }

  VectorOfprogram* AllPrograms() const { return allPrograms_; }
  bool AllPrograms(VectorOfprogram* data) {
    allPrograms_ = data;
    return true;
  }

  VectorOfmodule_inst* AllModules() const { return allModules_; }
  bool AllModules(VectorOfmodule_inst* data) {
    allModules_ = data;
    return true;
  }

  VectorOftypespec* Typespecs() const { return typespecs_; }
  bool Typespecs(VectorOftypespec* data) {
    typespecs_ = data;
    return true;
  }

  VectorOflet_decl* Let_decls() const { return let_decls_; }
  bool Let_decls(VectorOflet_decl* data) {
    let_decls_ = data;
    return true;
  }

  VectorOftask_func* Task_funcs() const { return task_funcs_; }
  bool Task_funcs(VectorOftask_func* data) {
    task_funcs_ = data;
    return true;
  }

  VectorOfany* Parameters() const { return parameters_; }
  bool Parameters(VectorOfany* data) {
    if (!parametersGroupCompliant(data)) return false;
    parameters_ = data;
    return true;
  }

  VectorOfparam_assign* Param_assigns() const { return param_assigns_; }
  bool Param_assigns(VectorOfparam_assign* data) {
    param_assigns_ = data;
    return true;
  }

  VectorOfmodule_inst* TopModules() const { return topModules_; }
  bool TopModules(VectorOfmodule_inst* data) {
    topModules_ = data;
    return true;
  }

  virtual design* DeepClone(BaseClass* parent, CloneContext* context) const override;

  virtual const BaseClass* GetByVpiName(std::string_view name) const override;

  virtual std::tuple<const BaseClass*, UHDM_OBJECT_TYPE, const std::vector<const BaseClass*>*> GetByVpiType(int32_t type) const override;

  virtual vpi_property_value_t GetVpiPropertyValue(int32_t property) const override;

  virtual int32_t Compare(const BaseClass* other, CompareContext* context) const override;

  virtual  UHDM_OBJECT_TYPE UhdmType() const final { return UHDM_OBJECT_TYPE::uhdmdesign; }

protected:
  void DeepCopy(design* clone, BaseClass* parent, CloneContext* context) const;

private:
  bool vpiElaborated_ = false;

  SymbolId vpiName_;

  VectorOfinclude_file_info* include_file_infos_ = nullptr;

  VectorOfpackage* allPackages_ = nullptr;

  VectorOfpackage* topPackages_ = nullptr;

  VectorOfclass_defn* allClasses_ = nullptr;

  VectorOfinterface_inst* allInterfaces_ = nullptr;

  VectorOfudp_defn* allUdps_ = nullptr;

  VectorOfprogram* allPrograms_ = nullptr;

  VectorOfmodule_inst* allModules_ = nullptr;

  VectorOftypespec* typespecs_ = nullptr;

  VectorOflet_decl* let_decls_ = nullptr;

  VectorOftask_func* task_funcs_ = nullptr;

  VectorOfany* parameters_ = nullptr;

  VectorOfparam_assign* param_assigns_ = nullptr;

  VectorOfmodule_inst* topModules_ = nullptr;
};


typedef FactoryT<design> designFactory;


typedef FactoryT<std::vector<design *>> VectorOfdesignFactory;

}  // namespace UHDM

#endif
