Develop and Download Open Source Software

Browse CVS Repository

Contents of /exerb/exerb-studio/model/file.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Tue Jun 17 04:25:16 2003 UTC (20 years, 9 months ago) by yuya
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -0 lines
* XMLの保存処理を試験的に実装

1
2 module Model
3
4 class File < Base
5
6 def initialize
7 @name = nil
8 @filepath = nil
9 @type = nil
10 end
11
12 attr_accessor :name, :filepath, :type
13
14 def self.new_from_xmlnode(node)
15 model = self.new
16 model.name = node.attributes['name']
17 model.filepath = node.attributes['filepath']
18 model.type = node.name
19
20 return model
21 end
22
23 def create_node(tree, parent)
24 node = tree.insertItem(parent, WConst::TVI_LAST, @name, Store.set(self))
25 tree.setItemIconOf(node, 2, 2)
26 end
27
28 def savexml(io)
29 io.puts(%|<#{@type} name="#{@name}" filepath="#{@filepath}" />|)
30 end
31
32 end
33
34 end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26