OpenVSP API Documentation 3.42.0
 
Loading...
Searching...
No Matches
Attributes Manager Functions

This group is for functions included in the Attributes Manager. The Attributes Manager stores Attributes and provides methods to add, delete, get and set them. Click here to return to the main page. More...

Functions

string vsp::SummarizeAttributes ()
 
string vsp::SummarizeAttributesAsTree ()
 
vector< string > vsp::FindAllAttributes ()
 
vector< string > vsp::FindAttributesByName (const string &search_str)
 
string vsp::FindAttributeByName (const string &search_str, int index)
 
string vsp::FindAttributeInCollection (const string &obj_id, const string &search_str, int index)
 
vector< string > vsp::FindAttributeNamesInCollection (const string &collID)
 
vector< string > vsp::FindAttributesInCollection (const string &collID)
 
vector< string > vsp::FindAttributedObjects ()
 
int vsp::GetObjectType (const string &attachID)
 
string vsp::GetObjectTypeName (const string &attachID)
 
string vsp::GetObjectName (const string &attachID)
 
string vsp::GetObjectParent (const string &id)
 
string vsp::GetChildCollection (const string &attachID)
 
string vsp::GetGeomSetCollection (const int &index)
 
string vsp::GetAttributeName (const string &attrID)
 
string vsp::GetAttributeID (const string &collID, const string &attributeName, int index)
 
string vsp::GetAttributeDoc (const string &attrID)
 
int vsp::GetAttributeType (const string &attrID)
 
string vsp::GetAttributeTypeName (const string &attrID)
 
vector< int > vsp::GetAttributeBoolVal (const string &attrID)
 
vector< int > vsp::GetAttributeIntVal (const string &attrID)
 
vector< double > vsp::GetAttributeDoubleVal (const string &attrID)
 
vector< string > vsp::GetAttributeStringVal (const string &attrID)
 
vector< double > vsp::GetAttributeParmVal (const string &attrID)
 
vector< string > vsp::GetAttributeParmName (const string &attrID)
 
vector< vec3dvsp::GetAttributeVec3dVal (const string &attrID)
 
vector< vector< int > > vsp::GetAttributeIntMatrixVal (const string &attrID)
 
vector< vector< double > > vsp::GetAttributeDoubleMatrixVal (const string &attrID)
 
void vsp::SetAttributeName (const string &attrID, const string &name)
 
void vsp::SetAttributeDoc (const string &attrID, const string &doc)
 
void vsp::SetAttributeBool (const string &attrID, bool value)
 
void vsp::SetAttributeInt (const string &attrID, int value)
 
void vsp::SetAttributeDouble (const string &attrID, double value)
 
void vsp::SetAttributeString (const string &attrID, const string &value)
 
void vsp::SetAttributeVec3d (const string &attrID, const vector< vec3d > value)
 
void vsp::SetAttributeIntMatrix (const string &attrID, const vector< vector< int > > value)
 
void vsp::SetAttributeDoubleMatrix (const string &attrID, const vector< vector< double > > value)
 
void vsp::DeleteAttribute (const string &attrID)
 
string vsp::AddAttributeBool (const string &collID, const string &attributeName, bool value)
 
string vsp::AddAttributeInt (const string &collID, const string &attributeName, const int value)
 
string vsp::AddAttributeDouble (const string &collID, const string &attributeName, const double value)
 
string vsp::AddAttributeString (const string &collID, const string &attributeName, const string &value)
 
string vsp::AddAttributeParm (const string &collID, const string &attributeName, const string &parmID)
 
string vsp::AddAttributeVec3d (const string &collID, const string &attributeName, const vector< vec3d > value)
 
string vsp::AddAttributeIntMatrix (const string &collID, const string &attributeName, const vector< vector< int > > value)
 
string vsp::AddAttributeDoubleMatrix (const string &collID, const string &attributeName, const vector< vector< double > > value)
 
string vsp::AddAttributeGroup (const string &collID, const string &attributeName)
 
int vsp::CopyAttribute (const string &attrID)
 
void vsp::CutAttribute (const string &attrID)
 
vector< string > vsp::PasteAttribute (const string &coll_id)
 

Detailed Description

Function Documentation

◆ AddAttributeBool()

string vsp::AddAttributeBool ( const string & collID,
const string & attributeName,
bool value )
extern

Add a boolean attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valueboolean value of new attribute

◆ AddAttributeDouble()

string vsp::AddAttributeDouble ( const string & collID,
const string & attributeName,
const double value )
extern

Add a double attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valuedouble value of new attribute

◆ AddAttributeDoubleMatrix()

string vsp::AddAttributeDoubleMatrix ( const string & collID,
const string & attributeName,
const vector< vector< double > > value )
extern

Add an Double Matrix attribute by name to an attribute collection use nested vectors/arrays of ints for matrix argument

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valueDouble matrix value of new attribute

◆ AddAttributeGroup()

string vsp::AddAttributeGroup ( const string & collID,
const string & attributeName )
extern

Add an empty Attribute Group-type attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute group

◆ AddAttributeInt()

string vsp::AddAttributeInt ( const string & collID,
const string & attributeName,
const int value )
extern

Add a integer attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valueinteger value of new attribute

◆ AddAttributeIntMatrix()

string vsp::AddAttributeIntMatrix ( const string & collID,
const string & attributeName,
const vector< vector< int > > value )
extern

Add an Int Matrix attribute by name to an attribute collection use nested vectors/arrays of ints for matrix argument

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valueint matrix value of new attribute

◆ AddAttributeParm()

string vsp::AddAttributeParm ( const string & collID,
const string & attributeName,
const string & parmID )
extern

Add a parm attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valuestring value of new attribute

◆ AddAttributeString()

string vsp::AddAttributeString ( const string & collID,
const string & attributeName,
const string & value )
extern

Add a string attribute by name to an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valuestring value of new attribute

◆ AddAttributeVec3d()

string vsp::AddAttributeVec3d ( const string & collID,
const string & attributeName,
const vector< vec3d > value )
extern

Add a Vec3d attribute by name to an attribute collection use vsp.vec3d() to create a vec3d object to pass into the args!

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]collIDstring ID of attribute collection
[in]attributeNamestring name of new attribute
[in]valueVec3d value of new attribute

◆ CopyAttribute()

int vsp::CopyAttribute ( const string & attrID)
extern

Copy an attribute to the clipboard by attributeID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring ID of attribute to be copied

◆ CutAttribute()

void vsp::CutAttribute ( const string & attrID)
extern

Cut an attribute from its collection to the clipboard by attributeID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring ID of attribute to be copied

◆ DeleteAttribute()

void vsp::DeleteAttribute ( const string & attrID)
extern

Delete attribute by attribute ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID

◆ FindAllAttributes()

vector< string > vsp::FindAllAttributes ( )
extern

Returns a vector of string IDs for all Attributes in the vehicle

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Vector of All Attribute IDs

◆ FindAttributeByName()

string vsp::FindAttributeByName ( const string & search_str,
int index )
extern

Searches all attributes that contain the search string, case insensitive, and returns the user-specified index

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Returns a StringID of the attribute indexed/searched by user, if found
Parameters
[in]search_strstring for filtering attributes in model
[in]indexint for indexing which of the vector of found attributes to select

◆ FindAttributedObjects()

vector< string > vsp::FindAttributedObjects ( )
extern

Get array of IDs of all OpenVSP entities that have populated attributeCollections Includes attributeGroups

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Array of IDs of entities in OpenVSP that contain populated attribute collections

◆ FindAttributeInCollection()

string vsp::FindAttributeInCollection ( const string & obj_id,
const string & search_str,
int index )
extern

Searches all attributes in an OpenVSP object or AttributeCollection that contain the search string, case insensitive, and returns the user-specified index. Works either with the ID of an object that contains an attributeCollection or just the ID of an attributeCollection.

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Returns a StringID of the attribute indexed/searched by user, if found
Parameters
[in]obj_idid of object to search within for attributes
[in]search_strstring for filtering attributes in object
[in]indexint for indexing which of the vector of found attributes to select

◆ FindAttributeNamesInCollection()

vector< string > vsp::FindAttributeNamesInCollection ( const string & collID)
extern

Return a list of all attribute Names within an attribute collection

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Array of result names
Parameters
[in]collIDstring ID of an attribute collection

◆ FindAttributesByName()

vector< string > vsp::FindAttributesByName ( const string & search_str)
extern

Returns all attributes that contain the string search_str within their name, case insensitive

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Vector of string IDs of matching Attributes
Parameters
[in]search_strstring for filtering attributes in model

◆ FindAttributesInCollection()

vector< string > vsp::FindAttributesInCollection ( const string & collID)
extern

Get all attribute IDs within a single AttributeCollection, referenced by collID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Vector of attribute IDs in an attribute collection.
Parameters
[in]collIDstring ID of an attribute collection

◆ GetAttributeBoolVal()

vector< int > vsp::GetAttributeBoolVal ( const string & attrID)
extern

Get the boolean value of a bool-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Bool value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeDoc()

string vsp::GetAttributeDoc ( const string & attrID)
extern

Return string doc of attribute by its ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Return string doc of attribute by its ID
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeDoubleMatrixVal()

vector< vector< double > > vsp::GetAttributeDoubleMatrixVal ( const string & attrID)
extern

Get the Double Matrix of an Double-matrix-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Double Matrix value of attribute as vector < vector < Double > >
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeDoubleVal()

vector< double > vsp::GetAttributeDoubleVal ( const string & attrID)
extern

Get the double value of a double-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Double value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeID()

string vsp::GetAttributeID ( const string & collID,
const string & attributeName,
int index )
extern

Return the ID of an attribute by its name and collection ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
String ID of attribute based on collectionID and name
Parameters
[in]collIDstring ID of an attribute collection
[in]attributeNamename of an attribute in that collection

◆ GetAttributeIntMatrixVal()

vector< vector< int > > vsp::GetAttributeIntMatrixVal ( const string & attrID)
extern

Get the Int Matrix of an Int-matrix-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Int Matrix value of attribute as vector < vector < int > >
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeIntVal()

vector< int > vsp::GetAttributeIntVal ( const string & attrID)
extern

Get the integer value of an int-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Int value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeName()

string vsp::GetAttributeName ( const string & attrID)
extern

Return the name of an attribute by its ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
String ID of attribute based on collectionID and name
Parameters
[in]collIDstring ID of an attribute collection
[in]attributeNamename of an attribute in that collection

◆ GetAttributeParmName()

vector< string > vsp::GetAttributeParmName ( const string & attrID)
extern

Get the name of the referenced parm of a parm-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Parm name of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeParmVal()

vector< double > vsp::GetAttributeParmVal ( const string & attrID)
extern

Get the parm value of a parm-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Parm value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeStringVal()

vector< string > vsp::GetAttributeStringVal ( const string & attrID)
extern

Get the string value of a string-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
String value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeType()

int vsp::GetAttributeType ( const string & attrID)
extern

Get int enum type of attribute by ID Use in conjunction with GetAttributeTypeName for getting strings or with the following enums vsp.BOOL_DATA vsp.INT_DATA vsp.DOUBLE_DATA vsp.STRING_DATA vsp.VEC3D_DATA vsp.INT_MATRIX_DATA vsp.DOUBLE_MATRIX_DATA vsp.NAMEVAL_COLLECTION_DATA vsp.ATTR_COLLECTION_DATA

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Int type of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeTypeName()

string vsp::GetAttributeTypeName ( const string & attrID)
extern

Get the attribute's type as a string

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Type of attribute as string
Parameters
[in]attrIDstring ID of attribute

◆ GetAttributeVec3dVal()

vector< vec3d > vsp::GetAttributeVec3dVal ( const string & attrID)
extern

Get the vec3d value of a string-type attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Vec3d value of attribute
Parameters
[in]attrIDstring ID of attribute

◆ GetChildCollection()

string vsp::GetChildCollection ( const string & attachID)
extern

Get collection ID from any OpenVSP object If ID is an attribute collection, return the same ID back If ID is an attribute group, return its nested collection

//==== Write Some Fake Test Results =====//
// not implemented
Returns
String ID of attribute collection associated with the attachID
Parameters
[in]attachIDstring ID of an OpenVSP object

◆ GetGeomSetCollection()

string vsp::GetGeomSetCollection ( const int & index)
extern

Get collection ID from a vehicle's GeomSet

//==== Write Some Fake Test Results =====//
// not implemented
Returns
String ID of attribute collection associated with the geom set
Parameters
[in]attachIDstring ID of an OpenVSP object

◆ GetObjectName()

string vsp::GetObjectName ( const string & attachID)
extern

Get the name of an OpenVSP Entity by ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
return string of object name
Parameters
[in]attachIDstring ID of an OpenVSP object

◆ GetObjectParent()

string vsp::GetObjectParent ( const string & id)
extern

Get the string ID of the entity's parent Attributes -> Attribute Collections Attribute Collections -> Objects that contain attribute Collections Geoms->Parent Geoms Parms->ParmContainers etc.

//==== Write Some Fake Test Results =====//
// not implemented
Returns
string ID of object parent

◆ GetObjectType()

int vsp::GetObjectType ( const string & attachID)
extern

Get the type of an OpenVSP Entity by ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
return string of object name
Parameters
[in]attachIDstring ID of an OpenVSP object

◆ GetObjectTypeName()

string vsp::GetObjectTypeName ( const string & attachID)
extern

Get the named type of an OpenVSP Entity by ID

//==== Write Some Fake Test Results =====//
// not implemented
Returns
return string of object name
Parameters
[in]attachIDstring ID of an OpenVSP object

◆ PasteAttribute()

vector< string > vsp::PasteAttribute ( const string & coll_id)
extern

Paste the attribute clipboard to the specified objectID ObjectID can be any OpenVSP entity that contains a AttributeCollection or simply the attributeCollectionID Returns a vector of pasted attributes IDs, if any

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]coll_idstring ID of destination for pasting attribute into

◆ SetAttributeBool()

void vsp::SetAttributeBool ( const string & attrID,
bool value )
extern

Set the Bool value of a bool-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valueboolean value for attribute

◆ SetAttributeDoc()

void vsp::SetAttributeDoc ( const string & attrID,
const string & doc )
extern

Set the docstring of an Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]docstring of documentation for attribute

◆ SetAttributeDouble()

void vsp::SetAttributeDouble ( const string & attrID,
double value )
extern

Set the Double value of a double-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valuedouble value for attribute

◆ SetAttributeDoubleMatrix()

void vsp::SetAttributeDoubleMatrix ( const string & attrID,
const vector< vector< double > > value )
extern

Set the double matrix of a double-matrix-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valuedouble matrix value for attribute

◆ SetAttributeInt()

void vsp::SetAttributeInt ( const string & attrID,
int value )
extern

Set the Int value of an int-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valueint value for attribute

◆ SetAttributeIntMatrix()

void vsp::SetAttributeIntMatrix ( const string & attrID,
const vector< vector< int > > value )
extern

Set the int matrix of a int-matrix-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valueint matrix value for attribute

◆ SetAttributeName()

void vsp::SetAttributeName ( const string & attrID,
const string & name )
extern

Set the name of an Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]docstring of documentation for attribute

◆ SetAttributeString()

void vsp::SetAttributeString ( const string & attrID,
const string & value )
extern

Set the String value of a string-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valuestring value for attribute

◆ SetAttributeVec3d()

void vsp::SetAttributeVec3d ( const string & attrID,
const vector< vec3d > value )
extern

Set the Vec3d value of a Vec3d-type Attribute by ID

//==== Write Some Fake Test Results =====//
// not implemented
Parameters
[in]attrIDstring of attribute ID
[in]valuevec3d value for attribute

◆ SummarizeAttributes()

string vsp::SummarizeAttributes ( )

Print a tab-delimited summary of all Attributes in the vehicle, denoting Name, Type, Data, Description, and path from Root of vehicle to Attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Tab-delimited summary of all Attributes in vehicle

◆ SummarizeAttributesAsTree()

string vsp::SummarizeAttributesAsTree ( )

Print a plain-text tree summary of all Attribute in the vehicle, each branch node showing the name and ID of the VSP object in the path to the attribute

//==== Write Some Fake Test Results =====//
// not implemented
Returns
Plain-text attribute tree of vehicle