Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:43

0001 // Created on: 1998-01-28
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IFSelect_SignMultiple_HeaderFile
0018 #define _IFSelect_SignMultiple_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Transient.hxx>
0023 #include <NCollection_Sequence.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <IFSelect_Signature.hxx>
0026 class Standard_Transient;
0027 class Interface_InterfaceModel;
0028 class TCollection_AsciiString;
0029 
0030 //! Multiple Signature : ordered list of other Signatures
0031 //! It concatenates on a same line the result of its sub-items
0032 //! separated by sets of 3 blanks
0033 //! It is possible to define tabulations between sub-items
0034 //! Moreover, match rules are specific
0035 class IFSelect_SignMultiple : public IFSelect_Signature
0036 {
0037 
0038 public:
0039   //! Creates an empty SignMultiple with a Name
0040   //! This name should take expected tabulations into account
0041   Standard_EXPORT IFSelect_SignMultiple(const char* const name);
0042 
0043   //! Adds a Signature. Width, if given, gives the tabulation
0044   //! If <maxi> is True, it is a forced tabulation (overlength is
0045   //! replaced by a final dot)
0046   //! If <maxi> is False, just 3 blanks follow an overlength
0047   Standard_EXPORT void Add(const occ::handle<IFSelect_Signature>& subsign,
0048                            const int                              width = 0,
0049                            const bool                             maxi  = false);
0050 
0051   //! Concatenates the values of sub-signatures, with their
0052   //! tabulations
0053   Standard_EXPORT const char* Value(
0054     const occ::handle<Standard_Transient>&       ent,
0055     const occ::handle<Interface_InterfaceModel>& model) const override;
0056 
0057   //! Specialized Match Rule
0058   //! If <exact> is False, simply checks if at least one sub-item
0059   //! matches
0060   //! If <exact> is True, standard match with Value
0061   //! (i.e. tabulations must be respected)
0062   Standard_EXPORT bool Matches(const occ::handle<Standard_Transient>&       ent,
0063                                const occ::handle<Interface_InterfaceModel>& model,
0064                                const TCollection_AsciiString&               text,
0065                                const bool                                   exact) const override;
0066 
0067   DEFINE_STANDARD_RTTIEXT(IFSelect_SignMultiple, IFSelect_Signature)
0068 
0069 private:
0070   NCollection_Sequence<occ::handle<Standard_Transient>> thesubs;
0071   NCollection_Sequence<int>                             thetabs;
0072 };
0073 
0074 #endif // _IFSelect_SignMultiple_HeaderFile