Commit a8f5a0a8 authored by claes's avatar claes

*** empty log message ***

parent 3f9ec11d
...@@ -27,3 +27,6 @@ ...@@ -27,3 +27,6 @@
060519 lw wb Update of instance objects when a class is modified (without reload). 060519 lw wb Update of instance objects when a class is modified (without reload).
060522 cs wtt Update Class added in menu, and new commands: 'update classes' and 060522 cs wtt Update Class added in menu, and new commands: 'update classes' and
'check classes'. 'check classes'.
060524 cs wb StructName in ObjBodyDef inserted in PostCreate method.
060524 cs wtt Bugfix in classeditor. Change of classname caused unidentified class of
the template object of the class.
\ No newline at end of file
/*
* Proview $Id: wb_c_objbodydef.c,v 1.3 2005-09-06 10:43:30 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* wb_c_classdef.c -- work bench methods of the ClassDef class. */
#include <string.h>
#include "wb_pwrs.h"
#include "wb_pwrs_msg.h"
#include "wb_ldh.h"
static pwr_tStatus AnteCreate (
ldh_tSesContext Session,
pwr_tObjid Father,
pwr_tClassId Class
) {
pwr_tCid cid;
pwr_tStatus sts;
if ( cdh_ObjidIsNull( Father))
return PWRS__POSOBJBODYDEF;
// Check that the father is of class ClassDef
sts = ldh_GetObjectClass( Session, Father, &cid);
if ( EVEN(sts) || cid != pwr_eClass_ClassDef)
return PWRS__POSOBJBODYDEF;
return PWRS__SUCCESS;
}
static pwr_tStatus AnteMove (
ldh_tSesContext Session,
pwr_tObjid Object,
pwr_tObjid Father,
pwr_tObjid OldFather
) {
// Check that that the father is the same
if ( !(Father.oix == OldFather.oix && Father.vid == OldFather.vid))
return PWRS__MOVEBODY;
return PWRS__SUCCESS;
}
pwr_dExport pwr_BindMethods($ObjBodyDef) = {
pwr_BindMethod(AnteCreate),
pwr_BindMethod(AnteMove),
pwr_NullMethod
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment