0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
[occt.git] / samples / mfc / standard / Common / Primitive / Sample2D_Image.h
CommitLineData
7fd59977 1#ifndef _Sample2D_Image_HeaderFile
2#define _Sample2D_Image_HeaderFile
3#include <Standard_Macro.hxx>
4#include <Standard_DefineHandle.hxx>
5
6#include <OSD_File.hxx>
7#include <Quantity_Length.hxx>
7fd59977 8#include <Quantity_Factor.hxx>
9#include <Standard_Boolean.hxx>
10#include <Standard_CString.hxx>
7fd59977 11#include <Standard_Integer.hxx>
5c1f974e 12#include <SelectMgr_Selection.hxx>
7fd59977 13#include <Standard_OStream.hxx>
14#include <Standard_IStream.hxx>
9e3ca93a 15class Sample2D_Image;
5c1f974e 16DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_TexturedShape)
17class Sample2D_Image : public AIS_TexturedShape {
7fd59977 18
19public:
20
5c1f974e 21Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName,
7fd59977 22 const Quantity_Length X = 0.0,
23 const Quantity_Length Y = 0.0,
7fd59977 24 const Quantity_Factor aScale = 1.0);
7fd59977 25Standard_EXPORT inline virtual void GetCoord(Quantity_Length& X,Quantity_Length& Y) const;
26Standard_EXPORT inline virtual void SetCoord(const Quantity_Length X,const Quantity_Length Y) ;
7fd59977 27Standard_EXPORT inline Quantity_Factor GetScale() const;
28Standard_EXPORT inline void SetScale(const Quantity_Factor aNewScale) ;
5c1f974e 29Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ;
7fd59977 30
9e3ca93a 31DEFINE_STANDARD_RTTI(Sample2D_Image,AIS_TexturedShape)
5c1f974e 32private:
33 void MakeShape();
7fd59977 34protected:
5c1f974e 35TopoDS_Face myFace;
36TCollection_AsciiString myFilename;
7fd59977 37Quantity_Length myX;
38Quantity_Length myY;
7fd59977 39Quantity_Factor myScale;
7fd59977 40
41};
42
43// other inline functions and methods (like "C++: function call" methods)
44//
45
46inline void Sample2D_Image::GetCoord(Quantity_Length& X, Quantity_Length& Y) const
47{
48 X = myX;
49 Y = myY;
50}
51
52inline void Sample2D_Image::SetCoord(const Quantity_Length X, const Quantity_Length Y)
53{
54 myX = X;
55 myY = Y;
56}
57
7fd59977 58inline Quantity_Factor Sample2D_Image::GetScale() const
59{
60 return myScale;
61}
62
63inline void Sample2D_Image::SetScale(const Quantity_Factor aNewScale)
64{
65 myScale = aNewScale;
66}
67
7fd59977 68
69
70#endif