CFx SDK Documentation  2020SP3
FxDesignDataSource.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 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"
FxPragmaPop.h
CFxDesignResourceModel::DataType
DataType
Definition: FxDesignResourceModel.h:110
CFxDesignDataSource::ValidateURL
virtual bool ValidateURL(CFxString &sURL, bool bCorrection=false) const =0
CFxDesignDataSource::BrowseResourceLocation
virtual bool BrowseResourceLocation(CFxString &strURL)=0
OdBinaryData
Definition: OdBinaryData.h:42
CFxDesignDataSource::GetHeaderColumnCount
virtual int GetHeaderColumnCount() const =0
CFxDesignDataSource::Copy
virtual Result Copy(const CFxDesignDataItem *pItem, OdBinaryData &data)
CFxDesignResourceModel::Operation
Operation
Definition: FxDesignResourceModel.h:88
CFxDesignDataItem
Definition: FxDesignDataItem.h:35
FxDesignResourceModel.h
DDKERNEL.h
OdArray< int, OdMemoryAllocator< int > >
IntArray.h
CFxDesignDataSource::GetHomeLocation
virtual CFxString GetHomeLocation() const =0
CFxDesignDataSource::GetHeaderColumnInfo
virtual void GetHeaderColumnInfo(int iIndex, CFxString &strColumnName, CFxDesignResourceModel::DataType &datatype) const =0
data
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
OdBinaryData.h
CFxDesignResourceModel::ItemType
ItemType
Definition: FxDesignResourceModel.h:33
CFxDesignDataSource::AddToFavorites
virtual void AddToFavorites(const CFxDesignDataItem *pItem)=0
CFxDesignDataSource::~CFxDesignDataSource
virtual ~CFxDesignDataSource(void)
CFxDesignDataSource::IsFavoritesSupported
virtual bool IsFavoritesSupported(CFxString &sFavoriteName)=0
CFxDesignDataSource::IsRefreshRequired
virtual bool IsRefreshRequired(CFxDesignDataItem *pItem)=0
OdSmartPtr
Definition: SmartPtr.h:58
FxDatabase.h
CFxString
Definition: FxString.h:48
CFxDesignDataSource::GetModel
CFxDesignResourceModel * GetModel() const
CFxDesignDataSource::PerformOperation
virtual bool PerformOperation(CFxDesignResourceModel::Operation, CFxDesignDataItem *pItem)=0
CFxDesignDataSource::DownloadFile
virtual bool DownloadFile(const CFxString &strURL, CFxString &strLocalPath)=0
OdPdfPublish::eOk
@ eOk
Definition: PdfPublishCommon.h:42
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
CFxDesignDataSource::LoadDatabase
virtual CFxDatabasePtr LoadDatabase(const CFxString &strURL, bool &bCacheIt)=0
CFxDesignDataSource::Result
Result
Definition: FxDesignDataSource.h:41
CFxDesignDataSource::AddChildren
virtual void AddChildren(CFxDesignDataItem *pParentItem)=0
CFxDesignDataSource::ColumnVisibilty
virtual void ColumnVisibilty(CFxDesignResourceModel::ItemType, OdIntArray &columnArray) const =0
CFxDesignDataSource::RemoveFromFavorites
virtual void RemoveFromFavorites(const CFxDesignDataItem *pItem)=0
CFxDesignDataSource::CFxDesignDataSource
CFxDesignDataSource()
CFxDesignDataSource::SetModel
void SetModel(CFxDesignResourceModel *pBaseModel)
CFxDesignDataSource::eFail
@ eFail
Definition: FxDesignDataSource.h:43
CFxDesignDataSource::IsLocalURL
virtual bool IsLocalURL(const CFxString &strURL)=0
CFxDesignDataSource::Find
virtual CFxDesignDataItem * Find(CFxString &strURL)=0
CFxDesignDataSource
Definition: FxDesignDataSource.h:35
CFxDesignDataSource::SetHomeLocation
virtual void SetHomeLocation(const CFxDesignDataItem *pItem)=0
FxPragmaPush.h
CFxDesignDataSource::Paste
virtual Result Paste(const OdBinaryData &data)
CFxDesignDataSource::DrawingSubItemVisibilty
virtual int DrawingSubItemVisibilty() const =0
CFxDesignDataSource::OpenDrawing
virtual void OpenDrawing(const CFxString &strDrawing)=0
CFxDesignResourceModel
Definition: FxDesignResourceModel.h:27
CFxDesignDataSource::eNotImplemented
@ eNotImplemented
Definition: FxDesignDataSource.h:44