pathsys.h #1

  • //
  • guest/
  • andrew_mcdonald/
  • p4hl/
  • src/
  • dlls/
  • pathsys.h
  • View
  • Commits
  • Open Download .zip Download (1 KB)
/*
 * Copyright 1995, 1996 Perforce Software.  All rights reserved.
 *
 * This file is part of Perforce - the FAST SCM System.
 */

/*
 * PathSys.h - OS specific pathnames
 *
 * Public classes:
 *
 *	PathSys - a StrBuf with virtual path manipulations
 *
 * Public methods:
 *
 *	StrBuf::Set() - set value in local syntax
 *	StrBuf::Text() - get value in local syntax
 *
 *	PathSys::SetRootedCanon() - combine (local) root and canonical path
 *	PathSys::SetRootedLocal() - combine (local) root and local path
 *	PathSys::AppendUnrootedCanon() - strip root and return rest as canon
 *	PathSys::ToParent() - strip (and return) last element of path
 *
 * Static functions:
 *
 *	Create() - returns an appropriate PathSys, given an OS type flag.
 *	GetOS() - returns a string for the OS name
 */

class PathSys : public StrBuf {

    public:
    	virtual		~PathSys();

	virtual void	SetRootedCanon( const StrPtr *root, const char *canon ) = 0;
	virtual void	SetRootedLocal( const StrPtr *root, const char *local ) = 0;
	virtual int	AppendUnrootedCanon( const StrPtr *root, StrBuf *t ) = 0;
	virtual int	ToParent( StrBuf *file = 0 ) = 0;

	static PathSys *Create();
	static PathSys *Create( int os );
	static PathSys *Create( const StrPtr &os, Error *e );
	static const char *GetOS();
} ;

# Change User Description Committed
#1 7292 Andrew McDonald initial submittal
//guest/sam_stafford/p4hl/src/dlls/pathsys.h
#1 1688 Sam Stafford Quick branch of new API files.
//guest/sam_stafford/p4hltest/pathsys.h
#1 1687 Sam Stafford Add files that didn't get added.