OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [ecostest/] [common/] [eCosTestUtils.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation, Inc.      
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
//=================================================================
23
//
24
//        eCosTestUtils.h
25
//
26
//        run test program
27
//
28
//=================================================================
29
//=================================================================
30
//#####DESCRIPTIONBEGIN####
31
//
32
// Author(s):     sdf
33
// Contributors:  sdf
34
// Date:          1999-04-01
35
// Description:   Utiltities for test infra
36
// Usage:
37
//
38
//####DESCRIPTIONEND####
39
 
40
#ifndef _ECOSTESTUTILS_H
41
#define _ECOSTESTUTILS_H
42
 
43
#include "eCosStd.h"
44
#include "Collections.h"
45
 
46
//=================================================================
47
// Various bits and pieces live here
48
//=================================================================
49
 
50
class CeCosTestUtils {
51
public:
52
 
53
        static bool CommandLine (int &argc,TCHAR **argv,bool bRequireResourceServer=true); // Parse the command line and extract the common options "-v", "-o", ....
54
        static void UsageMessage(bool bRequireResourceServer=true); // Output a usage message explaining the above
55
 
56
  // Find the tail of a filename
57
  static LPCTSTR  const Tail (LPCTSTR  const pszFile); // Tail of a filename, in the UNIX sense
58
 
59
  // File exists?
60
  static bool Exists (LPCTSTR pszFile);
61
  // And is a file? (as opposed to a directory)
62
  static bool IsFile (LPCTSTR pszFile);
63
 
64
  // File iterator.  Gets next file in directory, avoiding "." and ".."
65
  static bool NextFile (void *&pHandle,String &str);
66
  // Start file iteration and return first file.
67
  static bool StartSearch (void *&pHandle,String &str);
68
  // End file iteration
69
  static void EndSearch (void *&pHandle);
70
 
71
  // Get the file name of a "home directory" file
72
  static const String HomeFile (LPCTSTR pszFile);
73
 
74
protected:
75
 
76
};
77
 
78
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.