|
|
|||
File indexing completed on 2026-07-07 08:36:55
0001 // Created on: 1997-07-31 0002 // Created by: Denis PASCAL 0003 // Copyright (c) 1997-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 _TDataStd_Name_HeaderFile 0018 #define _TDataStd_Name_HeaderFile 0019 0020 #include <TDataStd_GenericExtString.hxx> 0021 #include <Standard_OStream.hxx> 0022 0023 class TDF_Label; 0024 class TCollection_ExtendedString; 0025 0026 class TDataStd_Name; 0027 DEFINE_STANDARD_HANDLE(TDataStd_Name, TDataStd_GenericExtString) 0028 0029 //! Used to define a name attribute containing a string which specifies the name. 0030 class TDataStd_Name : public TDataStd_GenericExtString 0031 { 0032 0033 public: 0034 //! class methods working on the name itself 0035 //! ======================================== 0036 //! Returns the GUID for name attributes. 0037 Standard_EXPORT static const Standard_GUID& GetID(); 0038 0039 //! Creates (if does not exist) and sets the name in the name attribute. 0040 //! from any label <L> search in father labels (L is not 0041 //! concerned) the first name attribute.if found set it in 0042 //! <father>. 0043 //! class methods working on the name tree 0044 //! ====================================== 0045 //! Search in the whole TDF_Data the Name attribute which 0046 //! fit with <fullPath>. Returns True if found. 0047 //! Search under <currentLabel> a label which fit with 0048 //! <name>. Returns True if found. Shortcut which avoids 0049 //! building a ListOfExtendedStrin. 0050 //! Search in the whole TDF_Data the label which fit with name 0051 //! Returns True if found. 0052 //! tools methods to translate path <-> pathlist 0053 //! =========================================== 0054 //! move to draw For Draw test we may provide this tool method which convert a path in a 0055 //! sequence of string to call after the FindLabel methods. 0056 //! Example: if it's given "Assembly:Part_1:Sketch_5" it will return in <pathlist> 0057 //! the list of 3 strings: "Assembly","Part_1","Sketch_5". 0058 //! move to draw from <pathlist> build the string path 0059 //! Name methods 0060 //! ============ 0061 Standard_EXPORT static Handle(TDataStd_Name) Set(const TDF_Label& label, 0062 const TCollection_ExtendedString& string); 0063 0064 //! Finds, or creates, a Name attribute with explicit user defined <guid> and sets <string>. 0065 //! The Name attribute is returned. 0066 Standard_EXPORT static Handle(TDataStd_Name) Set(const TDF_Label& label, 0067 const Standard_GUID& guid, 0068 const TCollection_ExtendedString& string); 0069 0070 Standard_EXPORT TDataStd_Name(); 0071 0072 //! Sets <S> as name. Raises if <S> is not a valid name. 0073 Standard_EXPORT void Set(const TCollection_ExtendedString& S) Standard_OVERRIDE; 0074 0075 //! Sets the explicit user defined GUID to the attribute. 0076 Standard_EXPORT void SetID(const Standard_GUID& guid) Standard_OVERRIDE; 0077 0078 //! Sets default GUID for the attribute. 0079 Standard_EXPORT void SetID() Standard_OVERRIDE; 0080 0081 Standard_EXPORT virtual Standard_OStream& Dump(Standard_OStream& anOS) const Standard_OVERRIDE; 0082 0083 DEFINE_DERIVED_ATTRIBUTE(TDataStd_Name, TDataStd_GenericExtString) 0084 }; 0085 0086 #endif // _TDataStd_Name_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|