yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Quintiq file version 2.0
#parent: #root
StaticMethod From32 (LibOpt_ScopeShared32 shared, LibOpt_ScopeThin scope, LibOpt_Group group) as LibOpt_ScopeSharedVector
{
  Description: 'Create a new `LibOpt_ScopeSharedVector` that contains all from the given `LibOpt_ScopeShared32` and the additional scope (including the associated group).'
  TextBody:
  [*
    vector := NumberVector::Construct( scope.Index() + 1 );
    vector.Set( 0, shared.Set() );
    vector.Set( scope.Index(), scope.Mask() );
    
    result := shared.Owner().ScopeSharedOwned( relnew,
                                               LibOpt_ScopeSharedVector,
                                               Set := vector.AsBinaryValue(),
                                               Type := shared.Type(),
                                               GroupVector := shared.GroupVectorAdd( scope, group )
                                               );
    
    shared.CopyScopesTo( scope, group, result );
    
    return result;
  *]
  InterfaceProperties { Accessibility: 'Module' }
}