Hi All,

I'd like to add a full compliment of vector handling methods to the
webkit/glue/CppVariant class.  The methods I'm proposing are as follows:

// Methods for retrieving vectors of different data types
std::vector<std::wstring> ToStringVector() const; // this method already
exists
std::vector<int32_t> ToInt32Vector() const;
std::vector<double> ToDoubleVector() const;
std::vector<boolean> ToBooleanVector() const;

// Methods for assigning vectors of different data types
void Set(const std::vector<std::wstring> &value);
void Set(const std::vector<std::int32_t> &value);
void Set(const std::vector<std::double> &value);
void Set(const std::vector<std::boolean> &value);

// Method to evaluate the first element in the NPObject and provide a hint
as to
// the most appropriate vector data type to use
enum VectorType {
   VECTOR_TYPE_STRING,
   VECTOR_TYPE_INT32,
   VECTOR_TYPE_DOUBLE,
   VECTOR_TYPE_BOOLEAN
};
VectorType GetVectorTypeHint() const;

Does the method naming scheme sound reasonable?  Any objections to the type
hint concept?  isStringVector(), isInt32Vector(), etc, aren't necessarily
appropriate because the NPObject isn't inherently of any particular vector
type -- we're just converting on the fly to the requested type.

Regards,
Marshall

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to chromium-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to