7 #ifndef __core_Array_h__ 8 #define __core_Array_h__ 21 class FE_DL_EXPORT
Array:
public std::vector<T>
25 explicit Array(
void) {}
27 explicit Array(U32 a_size):
28 std::vector<T>(a_size) {}
30 explicit Array(U32 a_size,
const T& a_value):
31 std::vector<T>(a_size,a_value) {}
34 std::vector<T>(a_other) {}
36 Array(
const std::vector<T>& a_other):
37 std::vector<T>(a_other) {}
40 {
return (
Array&)std::vector<T>::operator=(a_other); }
42 #if FE_CODEGEN<=FE_DEBUG 43 const T& operator[](I32 index)
const 47 return std::vector<T>::at(index);
49 catch(
const std::exception& std_e)
52 location.
sPrintf(
"Array<%s>::operator[%d] const",
53 FE_TYPESTRING(T).c_str(),index);
54 feX(location.
c_str(),std_e.what());
58 feX(
"Array::operator[] const",
"unrecognized exception");
61 return std::vector<T>::at(index);
64 T& operator[](I32 index)
68 return std::vector<T>::at(index);
70 catch(
const std::exception& std_e)
73 location.
sPrintf(
"Array<%s>::operator[%d]",
74 FE_TYPESTRING(T).c_str(),index);
75 feX(location.
c_str(),std_e.what());
79 feX(
"Array::operator[]",
"unrecognized exception");
82 return std::vector<T>::at(index);
90 #endif // __core_Array_h__ const FESTRING_I8 * c_str(void) const
Return the contents of the 8-bit buffer cast as signed bytes.
Definition: String.h:352
kernel
Definition: namespace.dox:3
String & sPrintf(const char *fmt,...)
Populate the string in the manner of sprintf().
Definition: String.cc:529
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21