// GetTO returns its Transfer Object
557266
func (r *ProjectPostCommentRevision) GetTO(users ...*User) *ProjectPostCommentRevisionTO {
	return &ProjectPostCommentRevisionTO{
		original:  r,
		Hcid:      r.Hcid,
		Message:   r.Message,
		Time:      r.Time,
		Timestamp: r.Time.Unix(),
		RevNo:     r.RevNo,
		Counter:   r.Counter,
	}
}
430567
func (p *ProjectFollower) GetTO(users ...*User) *ProjectFollowerTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(p.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(p.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectFollowerTO{
		original:  p,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      p.Time,
		Timestamp: p.Time.Unix(),
		ToNotify:  p.ToNotify,
		Counter:   p.Counter,
	}
}
1176641
func (fms *fileMetadataStore) getOS(layer ChainID) (string, error) {
	return runtime.GOOS, nil
}
576684
func (b Box) GetTop(defaults ...int) int {
	if !b.IsSet && b.Top == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	return b.Top
}
443537
func (o *ProjectOwner) GetTO(users ...*User) *ProjectOwnerTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(o.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(o.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectOwnerTO{
		original:  o,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      o.Time,
		Timestamp: o.Time.Unix(),
		ToNotify:  o.ToNotify,
		Counter:   o.Counter,
	}

}
934465
func (l *ProjectPostLurk) GetTO(users ...*User) *ProjectPostLurkTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(l.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(l.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectPostLurkTO{
		original:  l,
		Hpid:      l.Hpid,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      l.Time,
		Timestamp: l.Time.Unix(),
		Counter:   l.Counter,
	}
}
491847
func (dasher *DashVertexConverter) MoveTo(x, y float64) {
	dasher.next.MoveTo(x, y)
	dasher.x, dasher.y = x, y
	dasher.distance = dasher.dashOffset
	dasher.currentDash = 0
}
588048
func (v *Variable) SerializeTo(w io.Writer) error {
	_, err := w.Write(v.Bytes())
	return err
}
1215612
func (b *UserPostBookmark) GetTO(users ...*User) *UserPostBookmarkTO {
	var fromInfo *InfoTO
	if from, e := NewUser(b.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	return &UserPostBookmarkTO{
		original:  b,
		Hpid:      b.Hpid,
		FromInfo:  fromInfo,
		Time:      b.Time,
		Timestamp: b.Time.Unix(),
		Counter:   b.Counter,
	}
}
1321232
func (st *StateTransition) to() common.Address {
	if st.msg == nil || st.msg.To() == nil /* contract creation */ {
		return common.Address{}
	}
	return *st.msg.To()
}
1042217
func (s *Server) SendTo(to *Node, m Message) error {
	msg, err := s.serializer.Marshal(m)
	if err != nil {
		return fmt.Errorf("marshaling message: %v", err)
	}
	msg = append([]byte{getMessageType(m)}, msg...)
	return s.defaultClient.SendMessage(context.Background(), &to.URI, msg)
}
951151
func (p *TZlibTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
	if p.factory != nil {
		// wrap other factory
		var err error
		trans, err = p.factory.GetTransport(trans)
		if err != nil {
			return nil, err
		}
	}
	return NewTZlibTransport(trans, p.level)
}
310350
func (c *UserPostCommentRevision) GetTO(users ...*User) *UserPostCommentRevisionTO {
	return &UserPostCommentRevisionTO{
		original:  c,
		Hcid:      c.Hcid,
		Message:   c.Message,
		Time:      c.Time,
		Timestamp: c.Time.Unix(),
		RevNo:     c.RevNo,
		Counter:   c.Counter,
	}
}
116801
func (c *ProjectPostComment) GetTO(users ...*User) *ProjectPostCommentTO {
	if len(users) != 1 {
		panic("ProjectPostComment.GetTO requires a user parameter")
	}
	user := users[0]

	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(c.From); e == nil {
		fromInfo = from.Info().GetTO()
	}

	if to, e := NewProject(c.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectPostCommentTO{
		original:  c,
		Hcid:      c.Hcid,
		Hpid:      c.Hpid,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Message:   c.Message,
		Lang:      c.Lang,
		Time:      c.Time,
		Timestamp: c.Time.Unix(),
		CanDelete: user.CanDelete(c),
		CanEdit:   user.CanEdit(c),
	}
}
361597
func (p *PostClassification) GetTO(users ...*User) *PostClassificationTO {
	return &PostClassificationTO{
		original: p,
		ID:       p.ID,
		UHpid:    p.UHpid,
		GHpid:    p.GHpid,
		Tag:      p.Tag,
	}
}
1043143
func (i *IssuesSearchResult) GetTotal() int {
	if i == nil || i.Total == nil {
		return 0
	}
	return *i.Total
}
416080
func (b *BitSet) SetTo(i uint, value bool) *BitSet {
	if value {
		return b.Set(i)
	}
	return b.Clear(i)
}