General KERNEL Documentation     End User KERNEL Services  


idl/SALOMEDS_Attributes.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00003 // 
00004 //  This library is free software; you can redistribute it and/or 
00005 //  modify it under the terms of the GNU Lesser General Public 
00006 //  License as published by the Free Software Foundation; either 
00007 //  version 2.1 of the License. 
00008 // 
00009 //  This library is distributed in the hope that it will be useful, 
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 //  Lesser General Public License for more details. 
00013 // 
00014 //  You should have received a copy of the GNU Lesser General Public 
00015 //  License along with this library; if not, write to the Free Software 
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00017 // 
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 //
00021 //
00022 //  File   : SALOMEDS.idl
00023 //  Author : Yves FRICAUD
00024 //  $Header: /home/server/cvs/KERNEL/KERNEL_SRC/idl/SALOMEDS_Attributes.idl,v 1.8.2.1 2006/09/07 07:08:55 mkr Exp $
00025 
00029 #ifndef _SALOMEDS_AttributesIDL_
00030 #define _SALOMEDS_AttributesIDL_
00031 
00032 #include "SALOMEDS.idl"
00033 
00034 module SALOMEDS
00035 {
00038   typedef sequence <double> DoubleSeq;
00041   typedef sequence <long>   LongSeq;
00044   typedef sequence <string> StringSeq;
00049   struct Color {
00052    double R;
00055    double G;
00058    double B;
00059   };
00060   //==========================================================================
00065  //==========================================================================
00066 
00067   interface AttributeReal : GenericAttribute
00068   {
00074     double Value();
00080     void   SetValue(in double value);
00081 
00082   };
00083   //==========================================================================
00088   //==========================================================================
00089   interface AttributeInteger : GenericAttribute
00090   {
00096     long   Value();
00102     void   SetValue(in long value);
00103   };
00104   //==========================================================================
00109   //==========================================================================
00110   interface AttributeSequenceOfReal : GenericAttribute
00111   {
00116     void      Assign (in DoubleSeq other);
00120     DoubleSeq CorbaSequence();
00128     void      Add (in double value);
00135     void      Remove(in long index);
00144     void      ChangeValue(in long index, in double value);
00152     double    Value(in short index);
00159     long      Length();
00160   };
00161   //==========================================================================
00166   //==========================================================================
00167   interface AttributeSequenceOfInteger : GenericAttribute
00168   {
00173     void      Assign (in LongSeq other);
00177     LongSeq CorbaSequence();
00185     void      Add (in long value);
00194     void      Remove(in long index);
00201     void      ChangeValue(in long index, in long value);
00209     long      Value(in short index);
00216     long      Length();
00217   };
00218 
00219   //==========================================================================
00225   //==========================================================================
00226 
00227   interface AttributeName : GenericAttribute
00228   {
00234     string Value();
00242     void   SetValue(in string value);
00243   };
00244 
00245   //==========================================================================
00251   //==========================================================================
00252   interface AttributeComment : GenericAttribute
00253   {
00259     string Value();
00266     void   SetValue(in string value);
00267   };
00268   //==========================================================================
00274  //==========================================================================
00275   interface AttributeIOR : GenericAttribute
00276   {
00282     string Value();
00289     void   SetValue(in string value);
00290   };
00291 
00292   //==========================================================================
00297   //==========================================================================
00298   interface AttributePersistentRef : GenericAttribute
00299   {
00305     string Value();
00312     void   SetValue(in string value);
00313   };
00314 
00315   //==========================================================================
00320   //==========================================================================
00321   interface AttributeExternalFileDef: GenericAttribute
00322   {
00327     string Value();
00332     void   SetValue(in string value);
00333   };
00334 
00335   //==========================================================================
00340   //==========================================================================
00341   interface AttributeFileType: GenericAttribute
00342   {
00347     string Value();
00352     void   SetValue(in string value);
00353   };
00354 
00355   //==========================================================================
00356   //Below the list of presentation attributes for display study tree in browser
00357   //==========================================================================
00358 
00359 
00360   //==========================================================================
00366   //==========================================================================
00367   interface AttributeDrawable : GenericAttribute
00368   {
00375     boolean IsDrawable();
00384     void   SetDrawable(in boolean value);
00385   };
00386 
00387   //==========================================================================
00393   //==========================================================================
00394   interface AttributeSelectable : GenericAttribute
00395   {
00403     boolean IsSelectable();
00412     void   SetSelectable(in boolean value);
00413   };
00414 
00415   //==========================================================================
00422   //==========================================================================
00423   interface AttributeExpandable : GenericAttribute
00424   {
00431     boolean IsExpandable();
00439     void   SetExpandable(in boolean value);
00440   };
00441 
00442   //==========================================================================
00448   //==========================================================================
00449 
00450   interface AttributeFlags : GenericAttribute
00451   {
00452     long    GetFlags();
00453     void    SetFlags( in long theFlags );
00454 
00455     boolean Get( in long theFlag );
00456     void    Set( in long theFlag, in boolean theValue );
00457   };
00458 
00459   //==========================================================================
00464   //==========================================================================
00465 
00466   interface AttributeGraphic : GenericAttribute
00467   {
00468     void     SetVisibility( in long theViewId, in boolean theValue );
00469     boolean  GetVisibility( in long theViewId );
00470   };  
00471 
00472   //==========================================================================
00479   //==========================================================================
00480   interface AttributeOpened : GenericAttribute
00481   {
00488     boolean IsOpened();
00498     void   SetOpened(in boolean value);
00499   };
00500   //==========================================================================
00505   //==========================================================================
00506   interface AttributeTextColor : GenericAttribute
00507   {
00514     Color TextColor();
00523     void   SetTextColor(in Color value);
00524   };
00525 
00526   //==========================================================================
00531   //==========================================================================
00532   interface AttributeTextHighlightColor : GenericAttribute
00533   {
00542     Color TextHighlightColor();
00550     void   SetTextHighlightColor(in Color value);
00551   };
00552   //==========================================================================
00557   //==========================================================================
00558   interface AttributePixMap : GenericAttribute
00559   {
00563     boolean HasPixMap();
00570     string  GetPixMap();
00578     void    SetPixMap(in string value);
00579   };
00580 
00581   //==========================================================================
00591   //==========================================================================
00592   interface AttributeTreeNode : GenericAttribute
00593   {
00597     void              SetFather(in AttributeTreeNode value);
00601     boolean           HasFather();
00605     AttributeTreeNode GetFather();
00609     void              SetPrevious(in AttributeTreeNode value);
00613     boolean           HasPrevious();
00617     AttributeTreeNode GetPrevious();
00621     void              SetNext(in AttributeTreeNode value);
00625     boolean           HasNext();
00629     AttributeTreeNode GetNext();
00633     void              SetFirst(in AttributeTreeNode value);
00637     boolean           HasFirst();
00641     AttributeTreeNode GetFirst();
00647     void              SetTreeID(in string value);
00652     string            GetTreeID();
00653 
00657     void              Append(in AttributeTreeNode value);
00662     void              Prepend(in AttributeTreeNode value);
00667     void              InsertBefore(in AttributeTreeNode value);
00672     void              InsertAfter(in AttributeTreeNode value);
00679     void              Remove();
00680 
00686     long              Depth();
00690     boolean           IsRoot();
00694     boolean           IsDescendant(in AttributeTreeNode value);
00698     boolean           IsFather(in AttributeTreeNode value);
00702     boolean           IsChild(in AttributeTreeNode value);
00706     string            Label();
00707   };
00708   //==========================================================================
00713   //==========================================================================
00714   interface AttributeLocalID : GenericAttribute
00715   {
00721     long   Value();
00729     void   SetValue(in long value);
00730   };
00731 
00732   //==========================================================================
00737   //==========================================================================
00738   interface AttributeUserID : GenericAttribute
00739   {
00745     string Value();
00751     void   SetValue(in string value);
00752   };
00753 
00754   //==========================================================================
00761   //==========================================================================
00762 
00763   interface AttributeTarget : GenericAttribute
00764   {
00771     void          Add(in SObject anObject);
00775     SALOMEDS::Study::ListOfSObject Get();
00782     void          Remove(in SObject anObject);
00783   };
00784   //==========================================================================
00793   //==========================================================================
00794 
00795   interface AttributeTableOfInteger : GenericAttribute
00796   {
00800     exception IncorrectIndex {};
00804     exception IncorrectArgumentLength {};
00805 
00806     // titles: for table, for each row, for each column
00810     void SetTitle(in string theTitle);
00814     string GetTitle();
00818     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
00822     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
00826     StringSeq GetRowTitles();
00830     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
00834     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
00838     StringSeq GetColumnTitles();
00839 
00840     //Rows units
00844     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
00848     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
00852     StringSeq GetRowUnits();
00853 
00854     // table information
00858     long GetNbRows();
00862     long GetNbColumns();
00863 
00864     // operations with rows
00869     void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
00876     void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
00883     LongSeq GetRow(in long theRow) raises(IncorrectIndex);
00884 
00885     // operations with columns
00891     void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
00897     void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
00901     LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
00902 
00903     // operations with elements
00909     void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
00915     boolean HasValue(in long theRow, in long theColumn);
00921     long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
00922 
00927     void SetNbColumns(in long theNbColumns);
00928 
00932     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
00933     // operations with files
00937     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
00941     SALOMEDS::TMPFile SaveToFile();
00942   };
00943 
00944   //==========================================================================
00952   //==========================================================================
00953 
00954   interface AttributeTableOfReal : GenericAttribute
00955   {
00959     exception IncorrectIndex {};
00963     exception IncorrectArgumentLength {};
00964 
00965     // titles: for table, for each row, for each column
00969     void SetTitle(in string theTitle);
00973     string GetTitle();
00977     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
00981     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
00985     StringSeq GetRowTitles();
00989     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
00993     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
00997     StringSeq GetColumnTitles();
00998 
00999     //Rows units
01003     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
01007     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
01011     StringSeq GetRowUnits();
01012 
01013     // table information
01017     long GetNbRows();
01021     long GetNbColumns();
01022 
01023     // operations with rows
01027     void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
01031     void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
01035     DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
01036 
01037     // operations with columns
01041     void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
01045     void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
01049     DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
01050 
01051     // operations with elements
01057     void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
01063     boolean HasValue(in long theRow, in long theColumn);
01069     double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
01070 
01075     void SetNbColumns(in long theNbColumns);
01076 
01080     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
01081     // operations with files
01085     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
01089     SALOMEDS::TMPFile SaveToFile();
01090   };
01091 
01092 
01093 
01094   //==========================================================================
01102   //==========================================================================
01103 
01104   interface AttributeTableOfString : GenericAttribute
01105   {
01109     exception IncorrectIndex {};
01113     exception IncorrectArgumentLength {};
01114 
01115     // titles: for table, for each row, for each column
01119     void SetTitle(in string theTitle);
01123     string GetTitle();
01127     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
01131     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
01135     StringSeq GetRowTitles();
01139     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
01143     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
01147     StringSeq GetColumnTitles();
01148 
01149     //Rows units
01153     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
01157     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
01161     StringSeq GetRowUnits();
01162 
01163     // table information
01167     long GetNbRows();
01171     long GetNbColumns();
01172 
01173     // operations with rows
01177     void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
01181     void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
01185     StringSeq GetRow(in long theRow) raises(IncorrectIndex);
01186 
01187     // operations with columns
01191     void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
01195     void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
01199     StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
01200 
01201     // operations with elements
01207     void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
01213     boolean HasValue(in long theRow, in long theColumn);
01219     string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
01220 
01225     void SetNbColumns(in long theNbColumns);
01226 
01230     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
01231     // operations with files
01235     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
01239     SALOMEDS::TMPFile SaveToFile();
01240   };
01241 
01242 
01243   //==========================================================================
01251   //==========================================================================
01252 
01253   interface AttributeStudyProperties : GenericAttribute
01254   {
01258     void SetUserName(in string theName);
01263     string GetUserName();
01267     void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
01271     boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
01276     void SetCreationMode(in string theMode);
01281     string GetCreationMode();
01285     void SetModified(in long theModified);
01289     boolean IsModified();
01293     long GetModified();
01297     void SetLocked(in boolean theLocked);
01301     boolean IsLocked();
01305     void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
01310     void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
01311   };
01312   //==========================================================================
01317   //==========================================================================
01318 
01319   interface AttributePythonObject : GenericAttribute
01320   {
01326     void SetObject(in string theSequence, in boolean IsScript);
01330     string GetObject();
01335     boolean IsScript();
01336   };
01337   //==========================================================================
01342   //==========================================================================
01343   interface AttributeParameter : GenericAttribute
01344   {
01350     void SetInt(in string theID, in long theValue);
01355     long GetInt(in string theID);
01356 
01362     void SetReal(in string theID, in double theValue);
01367     double GetReal(in string theID);
01368 
01374     void SetString(in string theID, in string theValue);
01379     string GetString(in string theID);
01380   
01386     void SetBool(in string theID, in boolean theValue);
01391     boolean GetBool(in string theID);
01392   
01398     void SetRealArray(in string theID, in DoubleSeq theArray);
01403     DoubleSeq GetRealArray(in string theID);
01404 
01410     void SetIntArray(in string theID, in LongSeq theArray);
01415     LongSeq GetIntArray(in string theID);
01416 
01422     void SetStrArray(in string theID, in StringSeq theArray);
01427     StringSeq GetStrArray(in string theID);
01433     boolean IsSet(in string theID, in long theType);
01439     boolean RemoveID(in string theID, in long theType);
01443     AttributeParameter GetFather();
01447     boolean HasFather();
01451     boolean IsRoot();
01455     void Clear();
01460     StringSeq GetIDs(in long theType);
01461   };
01462 };
01463 #endif