1 # Copyright (c) 2022 Intel and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
17 self.ToStartObject = None
18 self.ToExpression = None
19 self.FromStartObject = None
20 self.FromExpression = None
29 if srcstr == None or dststr == None:
34 dststr = dststr.strip()
35 srcstr = srcstr.strip()
37 if dststr.startswith("start."):
38 action.ToStartObject = True
39 action.ToExpression = dststr[6:]
40 elif dststr.startswith("end."):
41 action.ToStartObject = False
42 action.ToExpression = dststr[4:]
46 if srcstr.startswith("start."):
47 action.FromStartObject = True
48 action.FromExpression = srcstr[6:]
49 elif srcstr.startswith("end."):
50 action.FromStartObject = False
51 action.FromExpression = srcstr[4:]
53 action.FromExpression = srcstr