6ec64e8bf9
I was learning from @jdelong and he said that you should use double quotes for local includes and angle brackets for library includes. I asked why our code was the way it was, and he said he wanted to clean it up. I beat him to it :) Conflicts: hphp/runtime/base/server/admin_request_handler.cpp hphp/runtime/vm/named_entity.h
130 linhas
4.8 KiB
C++
130 linhas
4.8 KiB
C++
/*
|
|
+----------------------------------------------------------------------+
|
|
| HipHop for PHP |
|
|
+----------------------------------------------------------------------+
|
|
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
|
|
| Copyright (c) 1997-2010 The PHP Group |
|
|
+----------------------------------------------------------------------+
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
| available through the world-wide-web at the following url: |
|
|
| http://www.php.net/license/3_01.txt |
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
+----------------------------------------------------------------------+
|
|
*/
|
|
|
|
#ifndef incl_HPHP_EXT_ITERATOR_H_
|
|
#define incl_HPHP_EXT_ITERATOR_H_
|
|
|
|
// >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
|
|
|
|
#include "hphp/runtime/base/base_includes.h"
|
|
#include "hphp/runtime/ext/ext_splfile.h"
|
|
|
|
namespace HPHP {
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class DirectoryIterator: public SplFileInfo {
|
|
public:
|
|
DECLARE_OBJECT_ALLOCATION(DirectoryIterator);
|
|
|
|
DirectoryIterator(CStrRef path);
|
|
|
|
static StaticString s_class_name;
|
|
// overriding ResourceData
|
|
virtual CStrRef o_getClassNameHook() const { return s_class_name; }
|
|
virtual bool isResource() const { return !m_dir.isNull();}
|
|
String getPathName() const;
|
|
|
|
void rewind();
|
|
bool valid();
|
|
void next();
|
|
bool isdot();
|
|
|
|
public:
|
|
String m_path;
|
|
Object m_dir;
|
|
Variant m_dirEntry;
|
|
int m_index;
|
|
};
|
|
|
|
class RecursiveDirectoryIterator: public DirectoryIterator {
|
|
public:
|
|
DECLARE_OBJECT_ALLOCATION(RecursiveDirectoryIterator);
|
|
|
|
RecursiveDirectoryIterator(CStrRef path, int flags);
|
|
|
|
static StaticString s_class_name;
|
|
// overriding ResourceData
|
|
virtual CStrRef o_getClassNameHook() const { return s_class_name; }
|
|
virtual bool isResource() const { return !m_dir.isNull();}
|
|
void rewind();
|
|
void next();
|
|
|
|
public:
|
|
int m_flags;
|
|
};
|
|
|
|
class RecursiveIteratorIterator: public SweepableResourceData {
|
|
public:
|
|
DECLARE_OBJECT_ALLOCATION(RecursiveIteratorIterator);
|
|
|
|
RecursiveIteratorIterator(CObjRef iterator, int mode, int flags);
|
|
~RecursiveIteratorIterator() {
|
|
freeAllIterators();
|
|
}
|
|
|
|
static StaticString s_class_name;
|
|
// overriding ResourceData
|
|
virtual CStrRef o_getClassNameHook() const { return s_class_name; }
|
|
virtual bool isResource() const { return !m_iterator.isNull();}
|
|
|
|
void freeAllIterators();
|
|
|
|
public:
|
|
typedef std::vector<std::pair<ObjectData*,int> > IteratorList;
|
|
|
|
Object m_iterator;
|
|
IteratorList m_iterators;
|
|
int m_mode;
|
|
int m_flags;
|
|
};
|
|
|
|
Object f_hphp_recursiveiteratoriterator___construct(CObjRef obj, CObjRef iterator, int64_t mode, int64_t flags);
|
|
Object f_hphp_recursiveiteratoriterator_getinneriterator(CObjRef obj);
|
|
Variant f_hphp_recursiveiteratoriterator_current(CObjRef obj);
|
|
Variant f_hphp_recursiveiteratoriterator_key(CObjRef obj);
|
|
void f_hphp_recursiveiteratoriterator_next(CObjRef obj);
|
|
void f_hphp_recursiveiteratoriterator_rewind(CObjRef obj);
|
|
bool f_hphp_recursiveiteratoriterator_valid(CObjRef obj);
|
|
|
|
bool f_hphp_directoryiterator___construct(CObjRef obj, CStrRef path);
|
|
Variant f_hphp_directoryiterator_key(CObjRef obj);
|
|
void f_hphp_directoryiterator_next(CObjRef obj);
|
|
void f_hphp_directoryiterator_rewind(CObjRef obj);
|
|
void f_hphp_directoryiterator_seek(CObjRef obj, int64_t position);
|
|
Variant f_hphp_directoryiterator_current(CObjRef obj);
|
|
String f_hphp_directoryiterator___tostring(CObjRef obj);
|
|
bool f_hphp_directoryiterator_valid(CObjRef obj);
|
|
bool f_hphp_directoryiterator_isdot(CObjRef obj);
|
|
|
|
bool f_hphp_recursivedirectoryiterator___construct(CObjRef obj, CStrRef path, int64_t flags);
|
|
Variant f_hphp_recursivedirectoryiterator_key(CObjRef obj);
|
|
void f_hphp_recursivedirectoryiterator_next(CObjRef obj);
|
|
void f_hphp_recursivedirectoryiterator_rewind(CObjRef obj);
|
|
void f_hphp_recursivedirectoryiterator_seek(CObjRef obj, int64_t position);
|
|
Variant f_hphp_recursivedirectoryiterator_current(CObjRef obj);
|
|
String f_hphp_recursivedirectoryiterator___tostring(CObjRef obj);
|
|
bool f_hphp_recursivedirectoryiterator_valid(CObjRef obj);
|
|
bool f_hphp_recursivedirectoryiterator_haschildren(CObjRef obj);
|
|
Object f_hphp_recursivedirectoryiterator_getchildren(CObjRef obj);
|
|
String f_hphp_recursivedirectoryiterator_getsubpath(CObjRef obj);
|
|
String f_hphp_recursivedirectoryiterator_getsubpathname(CObjRef obj);
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
}
|
|
|
|
#endif // incl_HPHP_EXT_ITERATOR_H_
|