Class ansys::dpf::StringField
Last update: 25.03.2026
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).
Inherits from:
Members
- callAPI
- data
- dataSize
- describe
- empty
- emptyStringField
- entityData
- entityDataById
- getClient
- getData
- hasBeenMovedLocally
- hasInternalObject
- isOnCommonAPI
- isSameObject
- location
- operator=
- operator=
- push_back
- push_back
- reserve
- resize
- scoping
- setData
- setScoping
- StringField
- StringField
- StringField
- StringField
- StringField
- ~DpfTypes
- ~StringField
Friends
Public static functions
Function emptyStringField
static StringField ansys::dpf::StringField::emptyStringField()
Return type: StringField
Public functions
Function ~StringField
virtual ansys::dpf::StringField::~StringField()
Return type:
Function StringField
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:
- Client const *const client: [in] Client to create the property field on.
- dp_int number_of_entities = 0 : [in] Number of entities reserved.
- dp_int data_size = 0 : [in] Reserved size of data.
Return type:
Function StringField
ansys::dpf::StringField::StringField(int id, Client const *const client)
Retrieve an existing instance of StringField on a server.
Parameters:
- int id: [in] Id of the StringField object on the server's database.
- Client const *const client: [in] Client instance designating the IP, port and protocol to use.
Return type:
Function StringField
ansys::dpf::StringField::StringField(dp_int number_of_entities=0, dp_int data_size=0)
Create a property with number of entities and data size.
Parameters:
- dp_int number_of_entities = 0 : [in] Number of entities reserved.
- dp_int data_size = 0 : [in] Reserved size of data.
Return type:
Function StringField
ansys::dpf::StringField::StringField(StringField const &)
Parameters:
- StringField const &
Return type:
Function StringField
ansys::dpf::StringField::StringField(StringField &&) noexcept
Parameters:
- StringField &&
Return type:
Function operator=
StringField & ansys::dpf::StringField::operator=(StringField const &)
Parameters:
- StringField const &
Return type: StringField &
Function operator=
StringField & ansys::dpf::StringField::operator=(StringField &&) noexcept
Parameters:
- StringField &&
Return type: StringField &
Function location
Location ansys::dpf::StringField::location() const
Returns:
Location of the property.
Return type: Location
Function scoping
Scoping ansys::dpf::StringField::scoping() const
Returns:
Scoping of the property.
Return type: Scoping
Function dataSize
dp_int ansys::dpf::StringField::dataSize() const
Returns:
Size of the data container.
Return type: dp_int
Function push_back
void ansys::dpf::StringField::push_back(dp_id entity_id, std::vector< std::string > const &values)
Push back the entity data.
Parameters:
- dp_id entity_id: [in] Id of entity for which to push data.
- std::vector< std::string > const & values: [in] Vector of data for entity.
Return type: void
Function push_back
void ansys::dpf::StringField::push_back(dp_id entity_id, const std::string *values, dp_index size)
Push back the entity data.
Parameters:
- dp_id entity_id: [in] Id of entity for which to push data.
- const std::string * values: [in] Vector of data for entity.
- dp_index size: [in] Number of entities.
Return type: void
Function setData
void ansys::dpf::StringField::setData(std::vector< std::string > const &data)
Set the data of the property field.
Parameters:
- std::vector< std::string > const & data: [in] Vector of data.
Return type: void
Function setScoping
void ansys::dpf::StringField::setScoping(ansys::dpf::Scoping &s)
Set the scoping of the property field.
Parameters:
Return type: void
Function data
DpfVector< std::string > ansys::dpf::StringField::data() const
Returns:
DpfVector of data array.
Return type: DpfVector< std::string >
Function getData
void ansys::dpf::StringField::getData(std::vector< std::string > &values_to_fill) const
Get all data for property entities.
Parameters:
- std::vector< std::string > & values_to_fill: [out] Property entity data.
Return type: void
Function 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:
- dp_index entity_index: [in] Index of entity for which to get data.
- DpfVector< std::string > & data: [out] Pointer to the data.
Return type: void
Function 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:
- dp_id entity_id: [in] Id of entity for which to get data.
- DpfVector< std::string > & data: [out] Pointer to the data.
Return type: void
Function reserve
void ansys::dpf::StringField::reserve(dp_int number_of_entities, dp_int overall_size=0)
Reserve the Field. Only implemented for in process udage. To reserve the size for gRPC usage, use the constructor.
Parameters:
- dp_int number_of_entities: [in] Number of entities.
- dp_int overall_size = 0 : [in] Total size of entity data.
Return type: void
Function resize
void ansys::dpf::StringField::resize(dp_int number_of_entities, dp_int overall_size)
Reserve the Field.
Parameters:
- dp_int number_of_entities: [in] Number of entities.
- dp_int overall_size: [in] Total size of entity data.
Return type: void