- /*
- * Copyright 1995, 2003 Perforce Software. All rights reserved.
- *
- * This file is part of Perforce - the FAST SCM System.
- */
- class StrBuf;
- class ErrorLog;
- enum P4DebugType {
- DT_DB, // DbOpen
- DT_DIFF, // Diff
- DT_DM, // Dm
- DT_DMC, // Dm commands
- DT_FTP, // Ftp Server
- DT_HANDLE, // Handles
- DT_LBR, // Lbr
- DT_MAP, // MapTable
- DT_NET, // Net
- DT_OPTIONS, // Optional behavior
- DT_RCS, // RCS
- DT_RECORDS, // VarRecords
- DT_RPC, // Rpc
- DT_SERVER, // Server
- DT_SPEC, // Spec
- DT_TRACK, // Track
- DT_ZEROCONF, // ZeroConf
- DT_OB, // Offline Broker
- DT_VIEWGEN, // Streamw view generator
- DT_LAST
- } ;
- class P4Tunable {
- public:
- void Set( const char *set );
- void Unset( const char *set );
- int Get( int t ) const { return list[t].value; }
- int GetLevel( const char *n ) const;
- const char *GetName( int t ) const { return list[t].name; }
- int IsSet( int t ) const { return list[t].isSet; }
- int IsKnown( const char * n );
- int IsNumeric( const char * n );
- protected:
- static struct tunable {
- const char *const name;
- int isSet;
- int value;
- int minVal;
- int maxVal;
- int modVal;
- int k; // what's 1k? 1000 or 1024?
- int original;
- } list[];
- } ;
- class P4DebugConfig {
- public:
- P4DebugConfig();
- virtual ~P4DebugConfig();
- virtual void Output();
- virtual StrBuf *Buffer();
- virtual int Alloc( int );
- void Install();
- void SetErrorLog( ErrorLog *e ) { elog = e; }
- protected:
- StrBuf *buf;
- int msz;
- ErrorLog *elog;
- };
- class P4Debug : private P4Tunable {
- public:
- void SetLevel( int l );
- void SetLevel( const char *set );
- void SetLevel( P4DebugType t, int l ) { list[t].value = l ;}
- int GetLevel( P4DebugType t ) const { return Get(t); }
- void ShowLevels( int showAll, StrBuf &buf );
- void printf( const char *fmt, ... );
- private:
- void Unbuffer();
- } ;
- extern P4Debug p4debug;
- extern P4Tunable p4tunable;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 7893 | Johan Nilsson | OFFLINE CHANGELIST 10 - SUBMITTED ON 2011/03/23 11:18:27 Upgrade project files to VS2010... and switching to msbuild for the entire project. Retargeted everything to .NET4 Client Profile for the time being, due to VS2010 C++ limitations (can't target anything other than 4.0 without complicating the setup too much). Shouldn't be too hard to retarget later if push comes to shove. Added VS2010 P4API stuff directly inside this project also to make things easier to get up and running for the moment. Removed old static P4API libraries. ____________________________________________________________ OFFLINE CHANGELIST 9 - SUBMITTED ON 2011/03/22 07:35:31 Converted to VS2010 « |
14 years ago |