メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TFileProperty.hh

解説を見る。
00001 // ============================================================================
00036 // ============================================================================
00037 #ifndef CLDAQ__TFILEPROPERTY_HH
00038 #define CLDAQ__TFILEPROPERTY_HH
00039 
00040 #include "Tglobals.h"
00041 
00042 
00062 class TFileProperty
00063 {
00064 
00065   private:
00066     Tstring thePathName;
00067     Tstring theDirectoryName;
00068     Tstring theFileName;
00069     Tstring theFileRootName;
00070     Tstring theFileExtensionName;
00071     Tint theDeviceNumber;
00072     Tint theDeviceMajorNumber;
00073     Tint theDeviceMiorNumber;
00074     Tint theInodeNumber;
00075     Tint theProtection;
00076     Tint theNumberOfHardLinks;
00077     Tint theDeviceType;
00078     Tint theTotalSize;
00079     Tint theBlockSize;
00080     Tint theNumberOfBlocks;
00081     Tint theUserID;
00082     Tint theGroupID;
00083     Tint theLastAccess;
00084     Tint theLastModification;
00085     Tint theLastChange;
00086     Tstring theStringUserID;
00087     Tstring theStringGroupID;
00088     Tstring theStringLastAccess;
00089     Tstring theStringLastModification;
00090     Tstring theStringLastChange;
00091 
00092   public:
00093     TFileProperty();
00094     TFileProperty( const Tstring& path );
00095     TFileProperty( const TFileProperty& right );
00096     ~TFileProperty();
00097 
00098   public:
00099     const TFileProperty& operator=( const TFileProperty& right );
00100     Tbool operator==( const TFileProperty& right ) const;
00101     Tbool operator!=( const TFileProperty& right ) const;
00102 
00103   public:
00104     const Tstring& GetPathName() const;
00105     const Tstring& GetDirectoryName() const;
00106     const Tstring& GetFileName() const;
00107     const Tstring& GetFileRootName() const;
00108     const Tstring& GetFileExtensionName() const;
00109     Tint GetDeviceNumber() const;
00110     Tint GetDeviceMajorNumber() const;
00111     Tint GetDeviceMiorNumber() const;
00112     Tint GetInodeNumber() const;
00113     Tint GetProtection() const;
00114     Tint GetNumberOfHardLinks() const;
00115     Tint GetDeviceType() const;
00116     Tint GetTotalSize() const;
00117     Tint GetBlockSize() const;
00118     Tint GetNumberOfBlocks() const;
00119     Tint GetUserID() const;
00120     Tint GetGroupID() const;
00121     Tint GetLastAccess() const;
00122     Tint GetLastModification() const;
00123     Tint GetLastChange() const;
00124     const Tstring& GetStringUserID() const;
00125     const Tstring& GetStringGroupID() const;
00126     const Tstring& GetStringLastAccess() const;
00127     const Tstring& GetStringLastModification() const;
00128     const Tstring& GetStringLastChange() const;
00129 
00130   public:
00131     Tvoid SetPathName( const Tstring& path );
00132     Tvoid Analyse();
00133     Tvoid Update();
00134     // ChangeMode とか Rename をする SetProtection(), SetUserID()
00135 
00136   public:
00137     Tbool IsCharacterDevice() const;
00138     Tbool IsBlockDevice() const;
00139     Tbool IsFIFO() const;
00140     Tbool IsSocket() const;
00141     Tbool IsSymbolicLink() const;
00142     Tbool IsRegularFile() const;
00143     Tbool IsDirectory() const;
00144     Tbool IsReadable() const;
00145     Tbool IsWritable() const;
00146     Tbool IsExecutable() const;
00147 
00148   public:
00149     friend Tostream& operator<<( Tostream& tos, const TFileProperty& right );
00150 
00151 #ifdef __CLDAQ_ROOT_DLL
00152     ClassDef(TFileProperty,0)
00153 #endif
00154 
00155 };
00156 
00157 inline const Tstring& TFileProperty::GetPathName() const
00158 {
00159   return thePathName;
00160 }
00161 
00162 inline const Tstring& TFileProperty::GetDirectoryName() const
00163 {
00164   return theDirectoryName;
00165 }
00166 
00167 inline const Tstring& TFileProperty::GetFileName() const
00168 {
00169   return theFileName;
00170 }
00171 
00172 inline const Tstring& TFileProperty::GetFileRootName() const
00173 {
00174   return theFileRootName;
00175 }
00176 
00177 inline const Tstring& TFileProperty::GetFileExtensionName() const
00178 {
00179   return theFileExtensionName;
00180 }
00181 
00182 inline Tint TFileProperty::GetDeviceNumber() const
00183 {
00184   return theDeviceNumber;
00185 }
00186 
00187 inline Tint TFileProperty::GetDeviceMajorNumber() const
00188 {
00189   return theDeviceMajorNumber;
00190 }
00191 
00192 inline Tint TFileProperty::GetDeviceMiorNumber() const
00193 {
00194   return theDeviceMiorNumber;
00195 }
00196 
00197 inline Tint TFileProperty::GetInodeNumber() const
00198 {
00199   return theInodeNumber;
00200 }
00201 
00202 inline Tint TFileProperty::GetProtection() const
00203 {
00204   return theProtection;
00205 }
00206 
00207 inline Tint TFileProperty::GetNumberOfHardLinks() const
00208 {
00209   return theNumberOfHardLinks;
00210 }
00211 
00212 inline Tint TFileProperty::GetDeviceType() const
00213 {
00214   return theDeviceType;
00215 }
00216 
00217 inline Tint TFileProperty::GetTotalSize() const
00218 {
00219   return theTotalSize;
00220 }
00221 
00222 inline Tint TFileProperty::GetBlockSize() const
00223 {
00224   return theBlockSize;
00225 }
00226 
00227 inline Tint TFileProperty::GetNumberOfBlocks() const
00228 {
00229   return theNumberOfBlocks;
00230 }
00231 
00232 inline Tint TFileProperty::GetUserID() const
00233 {
00234   return theUserID;
00235 }
00236 
00237 inline Tint TFileProperty::GetGroupID() const
00238 {
00239   return theGroupID;
00240 }
00241 
00242 inline Tint TFileProperty::GetLastAccess() const
00243 {
00244   return theLastAccess;
00245 }
00246 
00247 inline Tint TFileProperty::GetLastModification() const
00248 {
00249   return theLastModification;
00250 }
00251 
00252 inline Tint TFileProperty::GetLastChange() const
00253 {
00254   return theLastChange;
00255 }
00256 
00257 inline const Tstring& TFileProperty::GetStringUserID() const
00258 {
00259   return theStringUserID;
00260 }
00261 
00262 inline const Tstring& TFileProperty::GetStringGroupID() const
00263 {
00264   return theStringGroupID;
00265 }
00266 
00267 inline const Tstring& TFileProperty::GetStringLastAccess() const
00268 {
00269   return theStringLastAccess;
00270 }
00271 
00272 inline const Tstring& TFileProperty::GetStringLastModification() const
00273 {
00274   return theStringLastModification;
00275 }
00276 
00277 inline const Tstring& TFileProperty::GetStringLastChange() const
00278 {
00279   return theStringLastChange;
00280 }
00281 
00282 inline Tvoid TFileProperty::SetPathName( const Tstring& path )
00283 {
00284   thePathName = path;
00285   Analyse();
00286   return;
00287 }
00288 
00289 inline Tvoid TFileProperty::Update()
00290 {
00291   Analyse();
00292   return;
00293 }
00294 
00295 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.13.0)
Go IWAI <goiwai@users.sourceforge.jp>