namespace variable
{
//////////////////////////////////////////////////////
-
- struct char_ : public _basic_type<char>
+
+ template <typename T>
+ struct numeric_ : public _basic_type<T>
+ {
+ //numeric_():_basic_type<T>(0){}
+ numeric_(T v=0):_basic_type<T>(v){}
+ };
+
+ /////
+ struct char_ : public numeric_<char>
{
- char_(char v):_basic_type<char>(v){}
+ char_(){}
+ char_(char v):numeric_<char>(v){}
};
- struct short_ : public _basic_type<short>
+ struct short_ : public numeric_<short>
{
- short_(short v):_basic_type<short>(v){}
+ short_(){}
+ short_(short v):numeric_<short>(v){}
};
- struct int_ : public _basic_type<int>
+ struct int_ : public numeric_<int>
{
- int_(int v):_basic_type<int>(v){}
+ int_(){}
+ int_(int v):numeric_<int>(v){}
};
- struct long_ : public _basic_type<long>
+ struct long_ : public numeric_<long>
{
- long_(long v):_basic_type<long>(v){}
+ long_(){}
+ long_(long v):numeric_<long>(v){}
};
///////
- struct uchar_ : public _basic_type<unsigned char>
+ struct uchar_ : public numeric_<unsigned char>
{
- uchar_(unsigned char v):_basic_type<unsigned char>(v){}
+ uchar_(){}
+ uchar_(unsigned char v):numeric_<unsigned char>(v){}
};
- struct ushort_ : public _basic_type<unsigned short>
+ struct ushort_ : public numeric_<unsigned short>
{
- ushort_(unsigned short v):_basic_type<unsigned short>(v){}
+ ushort_(){}
+ ushort_(unsigned short v):numeric_<unsigned short>(v){}
};
- struct uint_ : public _basic_type<unsigned int>
+ struct uint_ : public numeric_<unsigned int>
{
- uint_(unsigned int v):_basic_type<unsigned int>(v){}
+ uint_(){}
+ uint_(unsigned int v):numeric_<unsigned int>(v){}
};
- struct ulong_ : public _basic_type<unsigned long>
+ struct ulong_ : public numeric_<unsigned long>
{
- ulong_(unsigned long v):_basic_type<unsigned long>(v){}
+ ulong_(){}
+ ulong_(unsigned long v):numeric_<unsigned long>(v){}
};
//////////////////////////////////////////////////////
--- /dev/null
+// Roast+ License
+/*
+*/
+#ifndef __SFJP_ROAST__lexical__variable__ptr_HPP__
+#define __SFJP_ROAST__lexical__variable__ptr_HPP__
+
+namespace roast
+{
+ namespace lexical
+ {
+ namespace variable
+ {
+ //////////////////////////////////////////////////////
+
+ template <typename T>
+ struct ptr_ : public _basic_type<T*>
+ {
+ ptr_(T* v=0):_basic_type<T*>(v){}
+ };
+
+ ////
+ struct char_ptr : public ptr_<char>
+ {
+ char_ptr(){}
+ char_ptr(char* v):ptr_<char>(v){}
+ };
+
+ struct const_char_ptr : public ptr_<const char>
+ {
+ const_char_ptr(){}
+ const_char_ptr(const char* v):ptr_<const char>(v){}
+ };
+
+ struct void_ptr : public ptr_<void>
+ {
+ void_ptr(){}
+ void_ptr(void* v):ptr_<void>(v){}
+ };
+
+ struct const_void_ptr : public ptr_<const void>
+ {
+ const_void_ptr(){}
+ const_void_ptr(const void* v):ptr_<const void>(v){}
+ };
+
+ //////////////////////////////////////////////////////
+ }
+ }
+}
+
+#endif//__SFJP_ROAST__lexical__variable__ptr_HPP__