[longomatch/redesign: 84/96] Add interface to handle Templates with generics
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign: 84/96] Add interface to handle Templates with generics
- Date: Tue, 29 Mar 2011 18:22:48 +0000 (UTC)
commit 15791ed42cd4837e7c5ddc9c92624045e1eaf16f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Mar 26 19:49:10 2011 +0100
Add interface to handle Templates with generics
LongoMatch/Interfaces/ITemplates.cs | 51 +++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Interfaces/ITemplates.cs b/LongoMatch/Interfaces/ITemplates.cs
new file mode 100644
index 0000000..cffdb34
--- /dev/null
+++ b/LongoMatch/Interfaces/ITemplates.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (C) 2011 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+
+namespace LongoMatch.Interfaces
+{
+ public interface ITemplate
+ {
+ void Save (string filename);
+ string Name {get;}
+ }
+
+ public interface ITemplateProvider
+ {
+ void CheckDefaultTemplate();
+ string[] TemplatesNames {get;}
+ bool Exists(string name);
+ void Copy (string orig, string copy);
+ void Delete (string templateName);
+ void Create (string templateName, params object [] list);
+ }
+
+ public interface ITemplateProvider<T>: ITemplateProvider where T: ITemplate
+ {
+ List<T> Templates {get;}
+ T Load (string name);
+ void Save (ITemplate template);
+ }
+
+ public interface ITemplateWidget<T>
+ {
+ T Template {get; set;}
+ }
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]