diff --git a/hvcc/__init__.py b/hvcc/__init__.py index c2513eb..2518fab 100644 --- a/hvcc/__init__.py +++ b/hvcc/__init__.py @@ -34,8 +34,8 @@ from hvcc.generators.c2pdext import c2pdext from hvcc.generators.c2wwise import c2wwise from hvcc.generators.c2unity import c2unity -from hvcc.generators.types.meta import Meta from hvcc.types.compiler import CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta class Colours: diff --git a/hvcc/generators/c2daisy/c2daisy.py b/hvcc/generators/c2daisy/c2daisy.py index ed6f45f..3dfaa77 100644 --- a/hvcc/generators/c2daisy/c2daisy.py +++ b/hvcc/generators/c2daisy/c2daisy.py @@ -7,11 +7,11 @@ from typing import Any, Dict, Optional from ..copyright import copyright_manager -from ..types.meta import Meta, Daisy from . import parameters from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta, Daisy hv_midi_messages = { @@ -26,7 +26,7 @@ } -class c2daisy(Compiler): +class c2daisy(Generator): """ Generates a Daisy wrapper for a given patch. """ diff --git a/hvcc/generators/c2dpf/c2dpf.py b/hvcc/generators/c2dpf/c2dpf.py index 558ee37..d9d43fd 100644 --- a/hvcc/generators/c2dpf/c2dpf.py +++ b/hvcc/generators/c2dpf/c2dpf.py @@ -23,11 +23,11 @@ from ..filters import filter_uniqueid from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta, DPF -from hvcc.types.compiler import Compiler, CompilerResp, CompilerMsg, CompilerNotif +from hvcc.types.compiler import Generator, CompilerResp, CompilerMsg, CompilerNotif +from hvcc.types.meta import Meta, DPF -class c2dpf(Compiler): +class c2dpf(Generator): """ Generates a DPF wrapper for a given patch. """ diff --git a/hvcc/generators/c2js/c2js.py b/hvcc/generators/c2js/c2js.py index daaff85..cda3e98 100644 --- a/hvcc/generators/c2js/c2js.py +++ b/hvcc/generators/c2js/c2js.py @@ -26,11 +26,11 @@ from ..copyright import copyright_manager from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta -class c2js(Compiler): +class c2js(Generator): """Compiles a directory of C source files into javascript. Requires the emscripten library to be installed - https://github.com/kripken/emscripten """ diff --git a/hvcc/generators/c2owl/c2owl.py b/hvcc/generators/c2owl/c2owl.py index cf96247..7e2e16e 100644 --- a/hvcc/generators/c2owl/c2owl.py +++ b/hvcc/generators/c2owl/c2owl.py @@ -10,15 +10,15 @@ from ..copyright import copyright_manager from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta heavy_hash = HeavyLangObject.HeavyLangObject.get_hash OWL_BUTTONS = ['Push', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8'] -class c2owl(Compiler): +class c2owl(Generator): """ Generates a OWL wrapper for a given patch. """ diff --git a/hvcc/generators/c2pdext/c2pdext.py b/hvcc/generators/c2pdext/c2pdext.py index 039da42..4a6fc03 100644 --- a/hvcc/generators/c2pdext/c2pdext.py +++ b/hvcc/generators/c2pdext/c2pdext.py @@ -24,11 +24,11 @@ from ..filters import filter_max from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta -class c2pdext(Compiler): +class c2pdext(Generator): """Generates a Pure Data external wrapper for a given patch. """ diff --git a/hvcc/generators/c2unity/c2unity.py b/hvcc/generators/c2unity/c2unity.py index 21433b3..5ba4998 100644 --- a/hvcc/generators/c2unity/c2unity.py +++ b/hvcc/generators/c2unity/c2unity.py @@ -24,11 +24,11 @@ from ..filters import filter_string_cap, filter_templates, filter_xcode_build, filter_xcode_fileref from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta -class c2unity(Compiler): +class c2unity(Generator): """Generates a Audio Native Plugin wrapper for Unity 5. """ diff --git a/hvcc/generators/c2wwise/c2wwise.py b/hvcc/generators/c2wwise/c2wwise.py index e492a06..1ffe83f 100644 --- a/hvcc/generators/c2wwise/c2wwise.py +++ b/hvcc/generators/c2wwise/c2wwise.py @@ -24,11 +24,11 @@ from ..filters import filter_plugin_id from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta -from hvcc.types.compiler import Compiler, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.compiler import Generator, CompilerResp, CompilerNotif, CompilerMsg +from hvcc.types.meta import Meta -class c2wwise(Compiler): +class c2wwise(Generator): """Generates a plugin wrapper for Audiokinetic's Wwise game audio middleware platform. """ diff --git a/hvcc/generators/types/__init__.py b/hvcc/generators/types/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/hvcc/types/compiler.py b/hvcc/types/compiler.py index 16e21fa..f02aad8 100644 --- a/hvcc/types/compiler.py +++ b/hvcc/types/compiler.py @@ -5,7 +5,7 @@ from pydantic import BaseModel from hvcc.interpreters.pd2hv.NotificationEnum import NotificationEnum -from hvcc.generators.types.meta import Meta +from hvcc.types.meta import Meta class CompilerMsg(BaseModel): @@ -33,7 +33,7 @@ class CompilerResp(BaseModel): ir: Dict[str, Any] = {} # TODO: improve Any type in Graph objects -class Compiler(ABC): +class Generator(ABC): @abstractmethod def compile( diff --git a/hvcc/generators/types/meta.py b/hvcc/types/meta.py similarity index 100% rename from hvcc/generators/types/meta.py rename to hvcc/types/meta.py diff --git a/hvcc/utils.py b/hvcc/utils.py index 469d0a4..4bd97a5 100644 --- a/hvcc/utils.py +++ b/hvcc/utils.py @@ -19,7 +19,7 @@ from hvcc.core.hv2ir.HeavyLangObject import HeavyLangObject from hvcc.interpreters.pd2hv.PdParser import PdParser -from hvcc.generators.types.meta import Meta, DPF, Daisy +from hvcc.types.meta import Meta, DPF, Daisy gens = {