[wadalabfont-kit] / jis2prim / Assumption.h  

Diff of /jis2prim/Assumption.h

Parent Directory | Revision Log

version 1.1, Thu Feb 21 11:57:39 2002 UTC version 1.2, Fri Feb 22 12:03:48 2002 UTC
Line 5 
Line 5 
   TenMask=1<<0,    TenMask=1<<0,
   YokoMask=1<<1,    YokoMask=1<<1,
   TateMask=1<<2,    TateMask=1<<2,
     HidariMask=1<<3,
     TatehaneMask=1<<4,
     TatehidariMask=1<<5,
 };  };
 enum JointType{  enum JointType{
   Start,    Start,
Line 19 
Line 22 
  protected:   protected:
   PtypeMask pmask;    PtypeMask pmask;
   JointType jtype;    JointType jtype;
   int x, y;    double x, y;
   int angle;    int angle;
     int hint;
  public:   public:
   SimpleAssumption(PtypeMask pm, JointType jt,int xx,int yy, int a)    SimpleAssumption(PtypeMask pm, JointType jt,double xx,double yy, int a,int h)
     :pmask(pm), jtype(jt), x(xx), y(yy), angle(a){}      :pmask(pm), jtype(jt), x(xx), y(yy), angle(a), hint(h){}
 };  };
 class AndAssumption{  class AndAssumption{
   friend ostream& operator<<(ostream &os,const AndAssumption &aa);    friend ostream& operator<<(ostream &os,const AndAssumption &aa);
Line 44 
Line 48 
     aaList.push_back(sa);      aaList.push_back(sa);
     return *this;      return *this;
   }    }
     Assumption& add(const SimpleAssumption &sa){
       aaList.push_back(AndAssumption().add(sa));
       return *this;
     }
 };  };
 ostream& operator<<(ostream &os,const SimpleAssumption &sa){  ostream& operator<<(ostream &os,const SimpleAssumption &sa){
   os << "SimpleAssumption(pmask=" << (int)(sa.pmask) << ",jtype=" << (int)(sa.jtype)    os << "SimpleAssumption(pmask=" << (int)(sa.pmask) << ",jtype=" << (int)(sa.jtype)
      << ",x=" << sa.x << ",y=" << sa.y << ",angle=" << sa.angle << ")";       << ",x=" << sa.x << ",y=" << sa.y << ",angle=" << sa.angle
        << ",hint=" << sa.hint << ")";
   return os;    return os;
 }  }
 ostream& operator<<(ostream &os,const AndAssumption &aa){  ostream& operator<<(ostream &os,const AndAssumption &aa){
   vector<SimpleAssumption>::const_iterator it;    vector<SimpleAssumption>::const_iterator it;
     if(aa.saList.size()==1){
       return os << *(aa.saList.begin());
     }
   os << "AndAssumption(";    os << "AndAssumption(";
   for(it=aa.saList.begin(); it!=aa.saList.end(); it++){    for(it=aa.saList.begin(); it!=aa.saList.end(); it++){
     os << *it << ' ';      os << *it << ' ';
Line 61 
Line 73 
 }  }
 ostream& operator<<(ostream &os,const Assumption &a){  ostream& operator<<(ostream &os,const Assumption &a){
   vector<AndAssumption>::const_iterator it;    vector<AndAssumption>::const_iterator it;
     if(a.aaList.size()==1){
       return os << *(a.aaList.begin());
     }
   os << "Assumption(";    os << "Assumption(";
   for(it=a.aaList.begin(); it!=a.aaList.end(); it++){    for(it=a.aaList.begin(); it!=a.aaList.end(); it++){
     os << *it << ' ';      os << *it << ' ';


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help