Changeset 23

Show
Ignore:
Timestamp:
02/01/08 15:15:56 (1 year ago)
Author:
skit
Message:

La classe Plugin devient une Interface.
Ajout des variables url, _licence.
Suppression des entetes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • project/trunk/src/pyxoo/__init__.py

    r22 r23  
    1 """ 
    2  Pyxoo 
     1 
     2__licence__=""" 
     3Pyxoo 
    34 
    45Copyright the original author or authors. 
     
    1718""" 
    1819 
    19  
    2020__version__ = "0.1" 
    2121__author__  = "Alexis Couronne" 
     22__url__     = "www.pyxoo.org" 
     23 
    2224 
    2325 
  • project/trunk/src/pyxoo/command.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
     1 
    182 
    193import pyxoo, logging 
    204 
    215__version__ = pyxoo.__version__ 
     6__licence__ = pyxoo.__licence__ 
     7__url__     = pyxoo.__url__ 
    228__author__  = "Alexis Couronne" 
     9 
    2310 
    2411 
  • project/trunk/src/pyxoo/core.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo, sys 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/event.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo, threading, logging, time 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/exceptions.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo, exceptions 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/model.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/plugin.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
    249 
    25 class Plugin
     10class Plugin( pyxoo.utils.Interface )
    2611    def fireOnInitPlugin( self ): 
    2712        """fireOnInitPlugin():void""" 
  • project/trunk/src/pyxoo/service.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Benoit Bar" 
  • project/trunk/src/pyxoo/utils/__init__.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/utils/interface.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo, types 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238  
  • project/trunk/src/pyxoo/utils/map.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/utils/stringifier.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/utils/type.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    181 
    192import pyxoo, types 
    203 
    214__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    227__author__  = "Alexis Couronne" 
    238 
  • project/trunk/src/pyxoo/view.py

    r22 r23  
    1 """ 
    2  Pyxoo 
    3  
    4 Copyright the original author or authors. 
    5  
    6 Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 
    7 you may not use this file except in compliance with the License. 
    8 You may obtain a copy of the License at 
    9  
    10      http://www.mozilla.org/MPL/MPL-1.1.html 
    11  
    12 Unless required by applicable law or agreed to in writing, software 
    13 distributed under the License is distributed on an "AS IS" BASIS, 
    14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    15 See the License for the specific language governing permissions and 
    16 limitations under the License. 
    17 """ 
    18  
    191 
    202import pyxoo 
    213 
    224__version__ = pyxoo.__version__ 
     5__licence__ = pyxoo.__licence__ 
     6__url__     = pyxoo.__url__ 
    237__author__  = "Alexis Couronne" 
    248 
  • project/trunk/test/commands/TestFrontController.py

    r21 r23  
    3030    def setUp( self ): 
    3131        self.instance = pyxoo.command.FrontController() 
    32         self.aPlugin = pyxoo.plugin.Plugin() 
     32        self.aPlugin = pyxoo.plugin.AbstractPlugin() 
    3333         
    3434    def testGetOwner( self ): 
  • project/trunk/test/model/TestModelLocator.py

    r21 r23  
    3232    def testMultiton( self ): 
    3333        self.assertTrue( id( self.instance ) == id( pyxoo.model.ModelLocator.getInstance() ) ) 
    34         self.assertFalse( id( self.instance ) == id( pyxoo.model.ModelLocator.getInstance( pyxoo.plugin.Plugin() ) ) ) 
    35         pluginA, pluginB = pyxoo.plugin.Plugin(), pyxoo.plugin.Plugin() 
     34        self.assertFalse( id( self.instance ) == id( pyxoo.model.ModelLocator.getInstance( pyxoo.plugin.AbstractPlugin() ) ) ) 
     35        pluginA, pluginB = pyxoo.plugin.AbstractPlugin(), pyxoo.plugin.AbstractPlugin() 
    3636        self.assertTrue( id( pyxoo.model.ModelLocator.getInstance( pluginA ) ) == id( pyxoo.model.ModelLocator.getInstance( pluginA ) ) ) 
    3737        self.assertFalse( id( pyxoo.model.ModelLocator.getInstance( pluginA ) ) == id( pyxoo.model.ModelLocator.getInstance( pluginB ) ) ) 
     
    4343         
    4444    def testRegisterModelWithPlugin( self ): 
    45         pluginA, pluginB = pyxoo.plugin.Plugin(), pyxoo.plugin.Plugin() 
     45        pluginA, pluginB = pyxoo.plugin.AbstractPlugin(), pyxoo.plugin.AbstractPlugin() 
    4646        self.assertTrue( pyxoo.model.ModelLocator.getInstance( pluginA ).registerModel( "v1", self.m1 ) ) 
    4747        self.assertFalse( pyxoo.model.ModelLocator.getInstance( pluginA ).registerModel( "v1", self.m1 ) ) 
  • project/trunk/test/plugin/TestChannelExpert.py

    r21 r23  
    2323class MockPlugin( pyxoo.plugin.Plugin ): 
    2424    def getChannel( self ): 
    25         return self.channel 
     25        return self.channel   
     26       
     27    def fireOnInitPlugin( self ):pass     
     28    def fireOnReleasePlugin( self ):pass            
     29    def fireExternalEvent( self, event, eventChannel ):pass     
     30    def firePublicEvent( self, event ):pass     
     31    def firePrivateEvent( self, event ):pass     
     32    def getModelLocator( self ):pass     
     33    def getViewLocator( self ):pass 
     34 
    2635 
    2736class TestChannelExpert( unittest.TestCase ): 
  • project/trunk/test/view/TestViewLocator.py

    r21 r23  
    3030    def testMultiTon( self ): 
    3131        self.assertTrue( id( self.instance ) == id( pyxoo.view.ViewLocator.getInstance() ) ) 
    32         self.assertFalse( id( self.instance ) == id( pyxoo.view.ViewLocator.getInstance( pyxoo.plugin.Plugin() ) ) )         
    33         pluginA, pluginB = pyxoo.plugin.Plugin(), pyxoo.plugin.Plugin() 
     32        self.assertFalse( id( self.instance ) == id( pyxoo.view.ViewLocator.getInstance( pyxoo.plugin.AbstractPlugin() ) ) )         
     33        pluginA, pluginB = pyxoo.plugin.AbstractPlugin(), pyxoo.plugin.AbstractPlugin() 
    3434        self.assertTrue( id( pyxoo.view.ViewLocator.getInstance( pluginA ) ) == id( pyxoo.view.ViewLocator.getInstance( pluginA ) ) ) 
    3535        self.assertFalse( id( pyxoo.view.ViewLocator.getInstance( pluginA ) ) == id( pyxoo.view.ViewLocator.getInstance( pluginB ) ) ) 
     
    4343         
    4444    def testResgisterViewWithPlugin( self ): 
    45         pluginA, pluginB = pyxoo.plugin.Plugin(), pyxoo.plugin.Plugin() 
     45        pluginA, pluginB = pyxoo.plugin.AbstractPlugin(), pyxoo.plugin.AbstractPlugin() 
    4646        self.assertTrue( pyxoo.view.ViewLocator.getInstance( pluginA ).registerView( "v1", self.view ) ) 
    4747        self.assertFalse( pyxoo.view.ViewLocator.getInstance( pluginA ).registerView( "v1", self.view ) )