Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/TDataStd_RealList.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 2007-05-29
0002 // Created by: Vlad Romashko
0003 // Copyright (c) 2007-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _TDataStd_RealList_HeaderFile
0017 #define _TDataStd_RealList_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <NCollection_List.hxx>
0022 #include <TDF_Attribute.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Standard_OStream.hxx>
0026 #include <Standard_GUID.hxx>
0027 
0028 class TDF_Label;
0029 class TDF_RelocationTable;
0030 
0031 //! Contains a list of doubles.
0032 class TDataStd_RealList : public TDF_Attribute
0033 {
0034 
0035 public:
0036   //! Static methods
0037   //! ==============
0038   //! Returns the ID of the list of doubles attribute.
0039   Standard_EXPORT static const Standard_GUID& GetID();
0040 
0041   //! Finds or creates a list of double values attribute.
0042   Standard_EXPORT static occ::handle<TDataStd_RealList> Set(const TDF_Label& label);
0043 
0044   //! Finds or creates a list of double values attribute with explicit user defined <guid>.
0045   Standard_EXPORT static occ::handle<TDataStd_RealList> Set(const TDF_Label&     label,
0046                                                             const Standard_GUID& theGuid);
0047 
0048   Standard_EXPORT TDataStd_RealList();
0049 
0050   Standard_EXPORT bool IsEmpty() const;
0051 
0052   Standard_EXPORT int Extent() const;
0053 
0054   Standard_EXPORT void Prepend(const double value);
0055 
0056   Standard_EXPORT void Append(const double value);
0057 
0058   //! Sets the explicit GUID (user defined) for the attribute.
0059   Standard_EXPORT void SetID(const Standard_GUID& theGuid) override;
0060 
0061   //! Sets default GUID for the attribute.
0062   Standard_EXPORT void SetID() override;
0063 
0064   //! Inserts the <value> before the first meet of <before_value>.
0065   Standard_EXPORT bool InsertBefore(const double value, const double before_value);
0066 
0067   //! Inserts the <value> before the <index> position.
0068   //! The indices start with 1 .. Extent().
0069   Standard_EXPORT bool InsertBeforeByIndex(const int index, const double before_value);
0070 
0071   //! Inserts the <value> after the first meet of <after_value>.
0072   Standard_EXPORT bool InsertAfter(const double value, const double after_value);
0073 
0074   //! Inserts the <value> after the <index> position.
0075   //! The indices start with 1 .. Extent().
0076   Standard_EXPORT bool InsertAfterByIndex(const int index, const double after_value);
0077 
0078   //! Removes the first meet of the <value>.
0079   Standard_EXPORT bool Remove(const double value);
0080 
0081   //! Removes a value at <index> position.
0082   Standard_EXPORT bool RemoveByIndex(const int index);
0083 
0084   Standard_EXPORT void Clear();
0085 
0086   Standard_EXPORT double First() const;
0087 
0088   Standard_EXPORT double Last() const;
0089 
0090   Standard_EXPORT const NCollection_List<double>& List() const;
0091 
0092   Standard_EXPORT const Standard_GUID& ID() const override;
0093 
0094   Standard_EXPORT void Restore(const occ::handle<TDF_Attribute>& With) override;
0095 
0096   Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
0097 
0098   Standard_EXPORT void Paste(const occ::handle<TDF_Attribute>&       Into,
0099                              const occ::handle<TDF_RelocationTable>& RT) const override;
0100 
0101   Standard_EXPORT Standard_OStream& Dump(Standard_OStream& anOS) const override;
0102 
0103   //! Dumps the content of me into the stream
0104   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0105 
0106   DEFINE_STANDARD_RTTIEXT(TDataStd_RealList, TDF_Attribute)
0107 
0108 private:
0109   NCollection_List<double> myList;
0110   Standard_GUID            myID;
0111 };
0112 
0113 #endif // _TDataStd_RealList_HeaderFile