summaryrefslogtreecommitdiff
path: root/include/argument.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/argument.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/argument.h')
-rw-r--r--include/argument.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/include/argument.h b/include/argument.h
index f45a43a..747f7a8 100644
--- a/include/argument.h
+++ b/include/argument.h
@@ -6,7 +6,7 @@
*
* The constructor of the argument is protected. Use the ByVal or ByRef
* classes instead.
- *
+ *
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2013, 2014 Copernica BV
*/
@@ -19,14 +19,14 @@ namespace Php {
/**
* Class definition
*/
-class Argument
+class PHPCPP_EXPORT Argument
{
public:
/**
* Destructor
*/
virtual ~Argument() {}
-
+
protected:
/**
* Constructor
@@ -35,9 +35,9 @@ protected:
* @param required Is this argument required?
* @param byref Is this a reference argument
*/
- Argument(const char *name, Type type, bool required = true, bool byref = false) :
+ Argument(const char *name, Type type, bool required = true, bool byref = false) :
_name(name), _type(type), _required(required), _byReference(byref) {}
-
+
/**
* Constructor
* @param name Name of the argument
@@ -48,7 +48,7 @@ protected:
*/
Argument(const char *name, const char *classname, bool nullable = true, bool required = true, bool byref = false) :
_name(name), _type(Type::Object), _classname(classname), _nullable(nullable), _required(required), _byReference(byref) {}
-
+
public:
/**
* Is this a required argument?
@@ -59,7 +59,7 @@ public:
{
return _required;
}
-
+
/**
* Name of the argument
* @return const char *
@@ -68,8 +68,8 @@ public:
{
return _name;
}
-
- /**
+
+ /**
* Type-hint for the argument
* @return Type
*/
@@ -77,7 +77,7 @@ public:
{
return _type;
}
-
+
/**
* If the type is a class, the name of the class
* @return const char *
@@ -86,7 +86,7 @@ public:
{
return _classname;
}
-
+
/**
* Is it allowed to pass parameter with a null value?
* @return bool
@@ -95,7 +95,7 @@ public:
{
return _nullable;
}
-
+
/**
* Is this a parameter-by-reference?
* @return bool
@@ -104,14 +104,14 @@ public:
{
return _byReference;
}
-
+
private:
/**
* Name of the argument
* @var const char *
*/
const char *_name = nullptr;
-
+
/**
* Type of argument
* @var Type
@@ -123,7 +123,7 @@ private:
* @var std::string
*/
const char *_classname = nullptr;
-
+
/**
* May the parameter be null?
* @var bool
@@ -135,7 +135,7 @@ private:
* @var bool
*/
bool _required = true;
-
+
/**
* Is this a 'by-reference' parameter?
* @var bool
@@ -156,7 +156,7 @@ using Arguments = std::vector<Argument>;
/**
* Other compilers, and visual C++ 2013 do support initializer lists
*/
-#else
+#else
/**
* A list of arguments can be supplied to methods
@@ -169,9 +169,8 @@ using Arguments = std::initializer_list<Argument>;
*/
#endif
-
+
/**
* End of namespace
*/
}
-