Lines Matching refs:W
42 template<class W>
44 W weight;
46 explicit WeightClassImpl(const W& weight) : weight(weight) { } in WeightClassImpl()
48 virtual WeightClassImpl<W> *Copy() const { in Copy()
49 return new WeightClassImpl<W>(weight); in Copy()
52 virtual const string &Type() const { return W::Type(); } in Type()
68 const WeightClassImpl<W> *typed_other =
69 static_cast<const WeightClassImpl<W> *>(&other);
81 template<class W>
82 explicit WeightClass(const W& weight) in WeightClass()
83 : element_type_(OTHER), impl_(new WeightClassImpl<W>(weight)) { } in WeightClass()
98 template<class W>
99 const W* GetWeight() const;
150 template<class W>
151 const W* WeightClass::GetWeight() const { in GetWeight()
155 static const W zero = W::Zero(); in GetWeight()
156 static const W one = W::One(); in GetWeight()
163 if (W::Type() != impl_->Type()) { in GetWeight()
166 WeightClassImpl<W> *typed_impl = in GetWeight()
167 static_cast<WeightClassImpl<W> *>(impl_); in GetWeight()
181 template<class W>
184 return new WeightClassImpl<W>(StrToWeight<W>(str, src, nline)); in StrToWeightImplBase()