CFx SDK Documentation  2023 SP0
FxDesignDataSource.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2022 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "DDKERNEL.h"
20 #include "FxDesignResourceModel.h"
21 #include "FxDatabase.h"
22 
23 #include <IntArray.h>
24 #include <OdBinaryData.h>
25 
26 #include "FxPragmaPush.h"
27 
28 class CFxString;
29 class CFxDesignDataItem;
35 {
36 public:
40  enum Result
41  {
42  eOk = 0,
45  };
46 
47 public:
49  virtual ~CFxDesignDataSource(void);
50 
56  void SetModel( CFxDesignResourceModel* pBaseModel );
58 
65  virtual void AddChildren( CFxDesignDataItem* pParentItem ) = 0;
66 
74  virtual bool ValidateURL( CFxString& sURL, bool bCorrection = false ) const = 0;
75 
86  virtual CFxDatabasePtr LoadDatabase( const CFxString& strURL, bool& bCacheIt ) = 0;
87 
94  virtual CFxDesignDataItem* Find(CFxString& strURL) = 0;
95 
102  virtual bool BrowseResourceLocation( CFxString& strURL ) = 0;
103 
107  virtual CFxString GetHomeLocation() const = 0;
108 
115  virtual void SetHomeLocation( const CFxDesignDataItem* pItem ) = 0;
116 
123  virtual void AddToFavorites( const CFxDesignDataItem* pItem ) = 0;
124  virtual void RemoveFromFavorites( const CFxDesignDataItem* pItem ) = 0;
125 
132  virtual void OpenDrawing( const CFxString& strDrawing ) = 0;
133 
139  virtual bool IsLocalURL( const CFxString& strURL ) = 0;
140 
148  virtual bool DownloadFile( const CFxString& strURL, CFxString& strLocalPath ) = 0;
149 
155  virtual int DrawingSubItemVisibilty() const = 0;
156 
165 
174  virtual void GetHeaderColumnInfo( int iIndex, CFxString& strColumnName, CFxDesignResourceModel::DataType& datatype ) const = 0;
175 
179  virtual int GetHeaderColumnCount() const = 0;
180 
188  virtual void ColumnVisibilty( CFxDesignResourceModel::ItemType, OdIntArray& columnArray ) const = 0;
189 
196  virtual bool IsRefreshRequired( CFxDesignDataItem *pItem ) = 0;
197 
208  virtual bool IsFavoritesSupported( CFxString& sFavoriteName ) = 0;
209 
222  virtual Result Copy( const CFxDesignDataItem* pItem, OdBinaryData& data );
223  virtual Result Paste( const OdBinaryData& data );
224 
225 private:
229  CFxDesignResourceModel* m_pBaseModel;
230 
231 };
232 
233 #include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
virtual int DrawingSubItemVisibilty() const =0
virtual Result Copy(const CFxDesignDataItem *pItem, OdBinaryData &data)
virtual bool BrowseResourceLocation(CFxString &strURL)=0
virtual bool DownloadFile(const CFxString &strURL, CFxString &strLocalPath)=0
virtual bool ValidateURL(CFxString &sURL, bool bCorrection=false) const =0
void SetModel(CFxDesignResourceModel *pBaseModel)
virtual ~CFxDesignDataSource(void)
virtual void RemoveFromFavorites(const CFxDesignDataItem *pItem)=0
virtual void AddToFavorites(const CFxDesignDataItem *pItem)=0
virtual void OpenDrawing(const CFxString &strDrawing)=0
virtual bool IsRefreshRequired(CFxDesignDataItem *pItem)=0
virtual int GetHeaderColumnCount() const =0
virtual void ColumnVisibilty(CFxDesignResourceModel::ItemType, OdIntArray &columnArray) const =0
virtual CFxString GetHomeLocation() const =0
virtual Result Paste(const OdBinaryData &data)
virtual void GetHeaderColumnInfo(int iIndex, CFxString &strColumnName, CFxDesignResourceModel::DataType &datatype) const =0
virtual bool IsLocalURL(const CFxString &strURL)=0
virtual bool PerformOperation(CFxDesignResourceModel::Operation, CFxDesignDataItem *pItem)=0
virtual bool IsFavoritesSupported(CFxString &sFavoriteName)=0
CFxDesignResourceModel * GetModel() const
virtual void AddChildren(CFxDesignDataItem *pParentItem)=0
virtual CFxDatabasePtr LoadDatabase(const CFxString &strURL, bool &bCacheIt)=0
virtual CFxDesignDataItem * Find(CFxString &strURL)=0
virtual void SetHomeLocation(const CFxDesignDataItem *pItem)=0
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110