gitlab.com/evatix-go/core@v1.3.55/coreinstruction/BaseLineIdentifier.go (about)

     1  package coreinstruction
     2  
     3  import (
     4  	"gitlab.com/evatix-go/core/reqtype"
     5  )
     6  
     7  type BaseLineIdentifier struct {
     8  	LineIdentifier
     9  }
    10  
    11  func NewBaseLineIdentifier(lineNumber int, modifyAs reqtype.Request) *BaseLineIdentifier {
    12  	return &BaseLineIdentifier{
    13  		LineIdentifier{
    14  			LineNumber:   lineNumber,
    15  			LineModifyAs: modifyAs,
    16  		},
    17  	}
    18  }
    19  
    20  func (it *BaseLineIdentifier) ToNewLineIdentifier() *LineIdentifier {
    21  	if it == nil {
    22  		return nil
    23  	}
    24  
    25  	return &LineIdentifier{
    26  		LineNumber:   it.LineNumber,
    27  		LineModifyAs: it.LineModifyAs,
    28  	}
    29  }
    30  
    31  func (it *BaseLineIdentifier) Clone() *BaseLineIdentifier {
    32  	if it == nil {
    33  		return nil
    34  	}
    35  
    36  	return &BaseLineIdentifier{
    37  		LineIdentifier{
    38  			LineNumber:   it.LineNumber,
    39  			LineModifyAs: it.LineModifyAs,
    40  		},
    41  	}
    42  }