lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Quintiq file version 2.0
#parent: #root
Method FindClassTypes (const Lib3DS_QueryParameters queryParam_i, Boolean isIncludeSubclassTypes_i) const as constcontent owning Lib3DS_ClassTypes
{
  Description:
  [*
    Find the instances of ClassTypes based on the type listed in the QueryParameters.
    Give true in isIncludeSubclassTypes_i to also include the subclasses of the types in the QueryParameters.
    The ClassTypes returned will be unique.
  *]
  TextBody:
  [*
    result := construct( Lib3DS_ClassTypes, constcontent );
    
    traverse( queryParam_i, Type, type )
    {
      classType := Lib3DS_ClassType::FindClassType( type.Name() );
      if( not isnull( classType ) )
      {
        result.Add( classType );
        
        if( isIncludeSubclassTypes_i )
        {
          subclassTypes := selectset( classType, AllSubTypes.SubType, st, true );
          result := result.Union( subclassTypes ); // do union to keep them unique
        }
      }
    }
    
    return &result;
  *]
  InterfaceProperties { Accessibility: 'Module' }
}