| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod Create (LibOpt_ScopeThin scope, LibOpt_Group group, String type) as LibOpt_ScopeShared | 
| { | 
|   Description: 'Create a `LibOpt_ScopeShared` with only one `LibOpt_Scope` associated with it.' | 
|   TextBody: | 
|   [* | 
|     result := null( LibOpt_ScopeShared ); | 
|      | 
|     group_vector := null( NumberVector ); | 
|     if( isnull( group ) ) | 
|     { | 
|       group_vector := NumberVector::Construct( 0 ); | 
|     } | 
|     else | 
|     { | 
|       group_vector := NumberVector::Construct( scope.ID() + 1 ); | 
|       group_vector.Set( scope.ID(), group.ID() ); | 
|     } | 
|      | 
|     if( scope.Index() = 0 ) | 
|     { | 
|       result := scope.ScopeSharedOwned( relnew, LibOpt_ScopeShared32, | 
|                                         Set := LibOpt_ScopeShared32::GetSetID( scope ), | 
|                                         Type := type, | 
|                                         GroupVector := group_vector.AsBinaryValue() ); | 
|     } | 
|     else | 
|     { | 
|       result := scope.ScopeSharedOwned( relnew, LibOpt_ScopeSharedVector, | 
|                                         Set := LibOpt_ScopeSharedVector::GetSetID( scope ), | 
|                                         Type := type, | 
|                                         GroupVector := group_vector.AsBinaryValue() ); | 
|     } | 
|      | 
|     LibOpt_ScopeSharedOnScope::Create( scope, group, result ); | 
|      | 
|     return result; | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |