Hi Marcus,
There are some parts of the flatcc API where there could be better support for raw pointer access but it requires some careful thought.
That said, vector types, i.e. those ending in _vec_t are const pointers to the underlying type, so you can access it directly:
And you can see its use with a struct in the following piece of test code (mind you this refers so source code as of version 0.3.4, for future ref)
I actually suspect the test will fail on big endian because it compares testvec_data[i].a unencoded with a decoded short value, but it's been a while.
For the generated reflection flatbuffer interface, you will see vec_t definition as
#define __flatbuffers_define_scalar_vector(N, T)\
typedef const T *N ## _vec_t;\
Except for byte sized integers, it will only work for little endian platforms, but this is also what you ask for.
There is a also a _mutable_vec_t that can be cast for in-place modification, which is used by heap sort internally:
As to need for abstraction in higher layers, this again is not entirely possible when considering all databytes and big endian systems, but one can add additional macro magic if needed.
Hope this helps.
Mikkel