Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:27

0001 // Copyright (c) 1999-2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Express_NamedType_HeaderFile
0015 #define _Express_NamedType_HeaderFile
0016 
0017 #include <Express_Type.hxx>
0018 #include <Standard_Type.hxx>
0019 
0020 class Express_Item;
0021 class TCollection_AsciiString;
0022 class TCollection_HAsciiString;
0023 
0024 //! Base class for complex types (ARRAY, LIST, BAG, SET)
0025 //! in EXPRESS schema
0026 //! Stores type of elements and
0027 class Express_NamedType : public Express_Type
0028 {
0029 
0030 public:
0031 
0032   //! Creates an object and initializes by name
0033   Standard_EXPORT Express_NamedType (const Standard_CString theName);
0034 
0035   //! Creates an object and initializes by name
0036   Standard_EXPORT Express_NamedType (const Handle(TCollection_HAsciiString)& theName);
0037 
0038   //! Returns name of type (item in schema)
0039   Standard_EXPORT const TCollection_AsciiString& Name() const;
0040 
0041   //! Returns a pointer to the type name to modify it
0042   Standard_EXPORT Handle(TCollection_HAsciiString) HName() const;
0043 
0044   //! Returns handle to referred item in schema
0045   Standard_EXPORT const Handle(Express_Item)& Item() const;
0046 
0047   //! Sets handle to referred item in schema
0048   Standard_EXPORT void SetItem (const Handle(Express_Item)& theItem);
0049 
0050   //! Returns CPP-style name of the type
0051   Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE;
0052 
0053   //! Return True if type is defined in package Standard
0054   Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE;
0055 
0056   //! Return True if type is simple (not a class)
0057   Standard_EXPORT virtual Standard_Boolean IsSimple() const Standard_OVERRIDE;
0058 
0059   //! Return True if type is inherited from Transient
0060   Standard_EXPORT virtual Standard_Boolean IsHandle() const Standard_OVERRIDE;
0061 
0062   //! Declares type as used by some item being generated.
0063   //! Calls Use() for referred item (found by name).
0064   Standard_EXPORT virtual Standard_Boolean Use() const Standard_OVERRIDE;
0065 
0066   //! Declares type as used by some item being generated.
0067   //! Calls Use() for referred item (found by name).
0068   Standard_EXPORT virtual void Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const Standard_OVERRIDE;
0069 
0070   DEFINE_STANDARD_RTTIEXT(Express_NamedType, Express_Type)
0071 
0072 protected:
0073 
0074 private:
0075 
0076   Handle(TCollection_HAsciiString) myName;
0077   Handle(Express_Item) myItem;
0078 
0079 };
0080 
0081 #endif // _Express_NamedType_HeaderFile