dataMetaDom 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5a34ddc40e94ae5a9075a76cd8896a3b3781b76
4
- data.tar.gz: 80d035936a0991579930f19b6bf4f8262f81c7fe
3
+ metadata.gz: 2578257bdf5a67a2a4c25cfec42f5229900f07d6
4
+ data.tar.gz: e2c063e1d81b3e4eba2738559f23400857d5a0e6
5
5
  SHA512:
6
- metadata.gz: 529782409a1e9957fba291b94318f96c7bea71f11415340039900be2a7d22d7e80761d4bfef5b5166e1b987d6dde4c5b9ea17e5e1579a9fc8194126b4508e53b
7
- data.tar.gz: 571cb5dddc02d545731ef0ada7ea573ee033682816a13dc3122dd117229c7ba2b44a357a0e918a8c30c7661b3e71afbdcf487c904d086964c60130e33daef5c2
6
+ metadata.gz: 924717e61de5af7360386aebfc6146224217bb63f73f5d4f1300bf45a9e4dcfee84eebc8a474d40b3f0b903568ef2545dce306ad46042e23dc0689251e836c0f
7
+ data.tar.gz: 0362a4721f67d263a3de838470a438fd6d1c4d7ef066f5666d837d14f807e92058108da778d35c1057d0820e359d0b1e63a70e0e16a75fbc2f4b86a698a820b3
data/lib/dataMetaDom.rb CHANGED
@@ -25,7 +25,7 @@ For command line details either check the new method's source or the README.rdoc
25
25
  module DataMetaDom
26
26
 
27
27
  # Current version
28
- VERSION = '1.0.0'
28
+ VERSION = '1.0.1'
29
29
 
30
30
  =begin rdoc
31
31
  Quick and dirty turning a Windows path into a path of the platform on which this script is running.
@@ -22,8 +22,8 @@ Attempts to consume/parse an enum from the given source on the given model, retu
22
22
  * src - an instance of SourceFile
23
23
  =end
24
24
  def self.consumed?(model, src)
25
- src.line =~ /^\s*#{ENUM}\s+(\w+)$/ ? model.addEnum(Enum.new(combineNsBase(
26
- nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
25
+ src.line =~ /^\s*#{ENUM}\s+(\w+)$/ ? model.addEnum(Enum.new(DataMetaDom.combineNsBase(
26
+ DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
27
27
  end
28
28
 
29
29
  =begin rdoc
@@ -129,7 +129,7 @@ Parses this field from the given source.
129
129
  @trgType = DataType.parse(source, trgSpec)
130
130
  unless STANDARD_TYPES.member?(@trgType.type)
131
131
  ns, base = DataMetaDom.splitNameSpace(@trgType.type)
132
- newNs = nsAdjustment(ns, model.options, source)
132
+ newNs = DataMetaDom.nsAdjustment(ns, model.options, source)
133
133
  newNsVer = "#{newNs}.#{base}".to_sym
134
134
  @trgType.type = newNsVer # adjust the type for the map target type too
135
135
  end
@@ -197,7 +197,7 @@ Maximum size of a Mapping (Map), rather aribtrary choice, not backed by any big
197
197
  k = rawType.to_sym
198
198
  srcType = PRIMS_TO_WRAP.has_key?(k) ? PRIMS_TO_WRAP[k] : rawType
199
199
  typeRenderer = JAVA_TYPES[trg.type]
200
- rawTrg = typeRenderer ? typeRenderer.call(trg) : condenseType(trg.type, javaPackage)
200
+ rawTrg = typeRenderer ? typeRenderer.call(trg) : DataMetaDom.condenseType(trg.type, javaPackage)
201
201
  k = rawTrg.to_sym
202
202
  trgType = PRIMS_TO_WRAP.has_key?(k) ? PRIMS_TO_WRAP[k] : rawTrg
203
203
  "Map<#{srcType}, #{trgType}>"
@@ -449,7 +449,7 @@ FIELD_JAVADOC
449
449
  # Unaggregated Java type
450
450
  def unaggrJavaType(dt, javaPackage)
451
451
  typeRenderer = JAVA_TYPES[dt.type]
452
- typeRenderer ? typeRenderer.call(dt) : condenseType(dt.type, javaPackage)
452
+ typeRenderer ? typeRenderer.call(dt) : DataMetaDom.condenseType(dt.type, javaPackage)
453
453
  end
454
454
 
455
455
  # aggregated Java type
@@ -478,7 +478,7 @@ All aggregation specifics are hhandled elsewhere (see genDataMetaSame)
478
478
  # the name of the DataMetaSame implementor of the Field's type, assuming it is available during compile time
479
479
  ftLsClassBase = "#{ftClassBase}#{suffix}"
480
480
  # import the class if it belogns to a different package
481
- imports << "#{combineNsBase(ftNs, ftLsClassBase)}" unless javaPackage == ftNs
481
+ imports << "#{DataMetaDom.combineNsBase(ftNs, ftLsClassBase)}" unless javaPackage == ftNs
482
482
  %Q<#{ftLsClassBase}.I.isSame(#{one}, #{another})>
483
483
 
484
484
  when (f.isRequired && PRIMITIVABLE_TYPES.member?(dt.type)) || (enumType && enumType.kind_of?(DataMetaDom::Enum))
@@ -102,7 +102,8 @@ Attempts to consume the instance from the given source, returns it if successful
102
102
  * +src+ - an instance of SourceFile
103
103
  =end
104
104
  def self.consumed?(model, src)
105
- src.line =~ /^\s*#{BITSET}\s+(\w+)\s+.+$/ ? model.addEnum(BitSet.new(combineNsBase(DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
105
+ src.line =~ /^\s*#{BITSET}\s+(\w+)\s+.+$/ ? model.addEnum(BitSet.new(DataMetaDom.combineNsBase(
106
+ DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
106
107
  end
107
108
 
108
109
  =begin rdoc
@@ -136,7 +137,8 @@ Attempts to consume the instance from the given source, returns it if successful
136
137
  * +src+ - an instance of SourceFile
137
138
  =end
138
139
  def self.consumed?(model, src)
139
- src.line =~ /^\s*#{MAPPING}\s+(\w+)\s+.+$/ ? model.addEnum(Mappings.new(combineNsBase(DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
140
+ src.line =~ /^\s*#{MAPPING}\s+(\w+)\s+.+$/ ? model.addEnum(Mappings.new(DataMetaDom.combineNsBase(
141
+ DataMetaDom.nsAdjustment(src.namespace, model.options, src), $1)).parse(src)) : nil
140
142
  end
141
143
 
142
144
  =begin rdoc
@@ -274,6 +274,6 @@ Python, for consistency.
274
274
  =end
275
275
  def setterName(f); "set#{DataMetaXtra::Str.capFirst(f.name.to_s)}" end
276
276
 
277
- module_function :setterName, :getterName
277
+ module_function :setterName, :getterName, :condenseType
278
278
 
279
279
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dataMetaDom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bergens