]> OCCT Git - occt-copy.git/commitdiff
0024342: Create non-constant methods ChangeCoord with index parameter in classes...
authorabk <abk@opencascade.com>
Mon, 11 Nov 2013 09:04:25 +0000 (13:04 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 13 Mar 2014 09:34:23 +0000 (13:34 +0400)
The methods were created.

src/gp/gp_XY.cdl
src/gp/gp_XY.lxx
src/gp/gp_XYZ.cdl
src/gp/gp_XYZ.lxx

index f3331e0a15d3ad7e9c35de7549fc11d44ec35016..800c10d1aa824642a3baece035af4cc3259bfb1d 100644 (file)
@@ -70,6 +70,11 @@ is
       raises OutOfRange
       is static;
 
+  ChangeCoord (me: in out; theIndex : Integer) returns Real
+      ---C++: inline
+      ---C++: return &
+      raises OutOfRange;
+
   Coord (me; X, Y : out Real)  is static;
         ---C++: inline
         ---Purpose: For this number pair, returns its coordinates X and Y.
index 32183e95ab5254d6bce92f610f20daa43ecc682f..460bbb638c8e3cc945fcf08fe9cb37a04c32fc41 100644 (file)
@@ -47,6 +47,12 @@ inline Standard_Real gp_XY::Coord (const Standard_Integer i) const
   return (&x)[i-1];
 }
 
+inline Standard_Real& gp_XY::ChangeCoord (const Standard_Integer theIndex)
+{
+  Standard_OutOfRange_Raise_if(theIndex < 1 || theIndex > 2,NULL);
+  return (&x)[theIndex - 1];
+}
+
 inline void gp_XY::Coord (Standard_Real& X,
                          Standard_Real& Y) const
 { X = x;  Y = y; }
index 8e40c31a4571f01fc9dcf4e401c350c5ea1f6ac0..a775fdb70a17b3045387bb8e9c41924b96f211c5 100644 (file)
@@ -78,6 +78,12 @@ is
       raises OutOfRange
       is static;
 
+   ChangeCoord (me: in out; theIndex : Integer) returns Real
+      ---C++: inline
+      ---C++: return &
+      raises OutOfRange;
+
+
   Coord (me; X, Y, Z : out Real)  is static;
         ---C++: inline
         --Purpose: For this XYZ object, returns:
index b060336abf9fed34787686a0dcf420aa0e02881d..9a9ed2a754ad97746ca47f359bf3ed2b68d1e139 100644 (file)
@@ -50,6 +50,12 @@ inline Standard_Real gp_XYZ::Coord (const Standard_Integer i) const {
   return (&x)[i-1];
 }
 
+inline Standard_Real& gp_XYZ::ChangeCoord(const Standard_Integer theIndex)
+{
+  Standard_OutOfRange_Raise_if(theIndex < 1 || theIndex > 3,NULL);
+  return (&x)[theIndex - 1];
+}
+
 inline void gp_XYZ::Coord (Standard_Real& X,
                           Standard_Real& Y,
                           Standard_Real& Z) const