|
Teamcenter C++ API Reference
2312
|
Functions | |
| template<typename T > | |
| T | array_length (size_t s) |
| template<typename Container , typename Vector > | |
| void | copyBack (const Container &container, Vector &vector) |
| T Teamcenter::Util::array_length | ( | size_t | s | ) |
Converts from one type to another using a static_cast call.
This template function is of special interest to correct conversion issues from "unsigned_int64" to "int", which arise with Visual Studio 2013 (error C4244 - "'=' : conversion from 'unsigned __int64' to 'int'").
The following code would generate a compilation error C4244 with Visual Studio 2013, because std::vector - size() returns the size of an array using the "unsigned __int64" type.
Definition at line 62 of file TcBaseUtils.hxx.
| void Teamcenter::Util::copyBack | ( | const Container & | container, |
| Vector & | vector | ||
| ) |
Copies all elements in the Container into the back of the Vector.
The container can be any of Standard Template Library (STL)-derived container that stores a collection of other objects and provides access either directly or through iterators.
| container | (I) The container to copy from |
| vector | (O) The vector to copy to |
Definition at line 40 of file TcBaseUtils.hxx.