ansys::dpf::StringField Class Reference
Last update: 10.07.2023
ansys::dpf::StringField Class Reference
#include <dpf_api.h>
Inheritance diagram for ansys::dpf::StringField:
Public Member Functions | |
StringField (Client const *const client, dp_int number_of_entities=0, dp_int data_size=0) | |
StringField (dp_int number_of_entities=0, dp_int data_size=0) | |
StringField (StringField const &) | |
StringField (StringField &&) | |
StringField & | operator= (StringField const &) |
StringField & | operator= (StringField &&) |
Location | location () const |
Scoping | scoping () const |
dp_int | dataSize () const |
void | push_back (dp_id entity_id, std::vector< std::string > const &values) |
void | setData (std::vector< std::string > const &data) |
void | setScoping (ansys::dpf::Scoping &s) |
DpfVector< std::string > | data () const |
void | getData (std::vector< std::string > &values_to_fill) const |
void | entityData (dp_index entity_index, DpfVector< std::string > &data) const |
void | entityDataById (dp_id entity_id, DpfVector< std::string > &data) const |
void | reserve (dp_int number_of_entities, dp_int overall_size=0) |
void | resize (dp_int number_of_entities, dp_int overall_size) |
Public Member Functions inherited from ansys::dpf::DpfTypes | |
virtual bool | empty () const |
virtual std::string | describe () const |
so::API const * | callAPI () const |
bool | isOnCommonAPI () const |
bool | getClient (Client &client) const |
bool | hasBeenMovedLocally () const |
bool | isSameObject (DpfTypes const &rhs) const |
Static Public Member Functions | |
static StringField | emptyStringField () |
Detailed Description
Holds string data describing a Property located on given entities (the StringField's data is bounded with its scoping). Is the equivalent of the Field but with string values data (and not double values).
Constructor & Destructor Documentation
◆ StringField() [1/2]
ansys::dpf::StringField::StringField | ( | Client const *const | client, |
dp_int | number_of_entities = 0 , |
||
dp_int | data_size = 0 |
||
) |
Create an empty property field with a client.
- Parameters
-
[in] client Client to create the property field on. [in] number_of_entities Number of entities reserved. [in] data_size Reserved size of data.
◆ StringField() [2/2]
Create a property with number of entities and data size.
- Parameters
-
[in] number_of_entities Number of entities reserved. [in] data_size Reserved size of data.
Member Function Documentation
◆ data()
◆ dataSize()
dp_int ansys::dpf::StringField::dataSize | ( | ) | const |
- Returns
- Size of the data container.
◆ entityData()
void ansys::dpf::StringField::entityData | ( | dp_index | entity_index, |
DpfVector< std::string > & | data | ||
) | const |
- Returns
- DpfVector of data array of an entity, by index.
- Parameters
-
[in] entity_index Index of entity for which to get data. [out] data Pointer to the data.
◆ entityDataById()
void ansys::dpf::StringField::entityDataById | ( | dp_id | entity_id, |
DpfVector< std::string > & | data | ||
) | const |
- Returns
- DpfVector of data array of an entity, by id.
- Parameters
-
[in] entity_id Id of entity for which to get data. [out] data Pointer to the data.
◆ getData()
void ansys::dpf::StringField::getData | ( | std::vector< std::string > & | values_to_fill | ) | const |
Get all data for property entities.
- Parameters
-
[out] values_to_fill Property entity data.
◆ location()
◆ push_back()
void ansys::dpf::StringField::push_back | ( | dp_id | entity_id, |
std::vector< std::string > const & | values | ||
) |
Push back the entity data.
- Parameters
-
[in] entity_id Id of entity for which to push data. [in] values Vector of data for entity.
◆ reserve()
Reserve the Field. Only implemented for in process udage. To reserve the size for gRPC usage, use the constructor.
- Parameters
-
[in] number_of_entities Number of entities. [in] overall_size Total size of entity data.
◆ resize()
Reserve the Field.
- Parameters
-
[in] number_of_entities Number of entities. [in] overall_size Total size of entity data.
◆ scoping()
◆ setData()
void ansys::dpf::StringField::setData | ( | std::vector< std::string > const & | data | ) |
Set the data of the property field.
- Parameters
-
[in] data Vector of data.
◆ setScoping()
void ansys::dpf::StringField::setScoping | ( | ansys::dpf::Scoping & | s | ) |
Set the scoping of the property field.