ni_nitdoc: added fast copy past utility to signatures.
[nit.git] / src / metamodel / abstractmetamodel.nit
index 6edfbd9..37f9472 100644 (file)
@@ -20,9 +20,10 @@ package abstractmetamodel
 
 import partial_order
 import location
+import symbol
 
 # The main singleton which knows everything
-class MMContext
+abstract class MMContext
 
        init do end
 
@@ -107,7 +108,7 @@ class MMDirectory
 end
 
 # A module is a Nit file
-class MMModule
+abstract class MMModule
        # Global context
        readable var _context: MMContext 
 
@@ -153,6 +154,14 @@ class MMModule
        # Dictionary of global classes
        var _global_class_by_name: Map[Symbol, MMGlobalClass] = new HashMap[Symbol, MMGlobalClass]
 
+       # Is a hybrid module partially implemented in extern code
+       # It is if it contains a new extern class or an
+       # extern class declaration
+       var is_extern_hybrid : Bool writable = false
+
+       # Uses foreign function interface
+       fun uses_ffi : Bool is abstract
+
        protected init(name: Symbol, dir: MMDirectory, context: MMContext, loc: Location)
        do
                _name = name
@@ -325,7 +334,7 @@ class MMGlobalClass
 end
 
 # Local classes are classes defined, refined or imported in a module
-class MMLocalClass
+abstract class MMLocalClass
        # The name of the local class
        readable var _name: Symbol
 
@@ -495,7 +504,7 @@ class MMLocalClass
                return _global_properties.has(glob)
        end
 
-       # Get a local proprty by its global property
+       # Get a local property by its global property
        fun [](glob: MMGlobalProperty): MMLocalProperty
        do
                return _local_property_by_global[glob]
@@ -589,7 +598,7 @@ class MMGlobalProperty
 end
 
 # Local properties are properties defined (explicitely or not) in a local class
-class MMLocalProperty
+abstract class MMLocalProperty
        # The name of the property
        readable var _name: Symbol
 
@@ -651,7 +660,7 @@ class MMLocalProperty
 end
 
 # Attribute local properties
-class MMAttribute
+abstract class MMAttribute
        super MMLocalProperty
 end
 
@@ -661,7 +670,7 @@ class MMExplicitImport
 end
 
 # Method local properties
-class MMMethod
+abstract class MMMethod
        super MMLocalProperty
        # Is the method defined with intern
        fun is_intern: Bool is abstract
@@ -680,7 +689,7 @@ class MMMethod
 end
 
 # Concrete local classes
-class MMConcreteClass
+abstract class MMConcreteClass
        super MMLocalClass
 end