summaryrefslogtreecommitdiff
path: root/include/iterator.h
diff options
context:
space:
mode:
authorMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
committerMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
commit7a928e2b19bddf152fd838469cc50805d4132401 (patch)
tree0a6657f4b94c27556b2f218e407f752018540d3b /include/iterator.h
parentae4fa5f871d937773e9facde87a32784e715e3ae (diff)
Changed default visibility for symbols in the PHP-CPP library to hidden and explicitly exported all symbols available from the public API. Moved the hiddenpointer to the zend implementation directory as it is not meant to be used publicly and not referenced anywhere from the API anyway
Diffstat (limited to 'include/iterator.h')
-rw-r--r--include/iterator.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/iterator.h b/include/iterator.h
index 331c8b3..5d49e1f 100644
--- a/include/iterator.h
+++ b/include/iterator.h
@@ -3,9 +3,9 @@
*
* Base class for iterators. Extension writers that want to create traversable
* classes, should override the Php::Traversable base class. This base class
- * forces you to implement a getIterator() method that returns an instance of
+ * forces you to implement a getIterator() method that returns an instance of
* a Php::Iterator class.
- *
+ *
* In this file you find the signature of the Php::Iterator class. It mostly has
* pure virtual methods, which means that you should create a derived class
* that implements all these methods.
@@ -22,7 +22,7 @@ namespace Php {
/**
* Class definition
*/
-class Iterator
+class PHPCPP_EXPORT Iterator
{
public:
/**
@@ -30,40 +30,40 @@ public:
* @param base Class over which the iterator is iterating
*/
Iterator(Base *base) : _object(base) {}
-
+
/**
* Destructor
*/
virtual ~Iterator() {}
-
+
/**
* Is the iterator on a valid position
* @return bool
*/
virtual bool valid() = 0;
-
+
/**
* The value at the current position
* @return Value
*/
virtual Value current() = 0;
-
+
/**
* The key at the current position
* @return Value
*/
virtual Value key() = 0;
-
+
/**
* Move to the next position
*/
virtual void next() = 0;
-
+
/**
* Rewind the iterator to the front position
*/
virtual void rewind() = 0;
-
+
protected:
/**
* During the lifetime of the iterator, the object over which
@@ -72,9 +72,9 @@ protected:
* @var Value
*/
Value _object;
-
+
};
-
+
/**
* End namespace
*/