Package edu.wpi.first.util.struct
Class StructDescriptorDatabase
java.lang.Object
edu.wpi.first.util.struct.StructDescriptorDatabase
public class StructDescriptorDatabase extends Object
Database of raw struct dynamic descriptors.
-
Constructor Summary
Constructors Constructor Description StructDescriptorDatabase()
Default constructor. -
Method Summary
Modifier and Type Method Description StructDescriptor
add(String name, String schema)
Adds a structure schema to the database.StructDescriptor
find(String name)
Finds a structure in the database by name.
-
Constructor Details
-
StructDescriptorDatabase
public StructDescriptorDatabase()Default constructor.
-
-
Method Details
-
add
Adds a structure schema to the database. If the struct references other structs that have not yet been added, it will not be valid until those structs are also added.- Parameters:
name
- structure nameschema
- structure schema- Returns:
- Added struct dynamic descriptor
- Throws:
BadSchemaException
- if schema invalid
-
find
Finds a structure in the database by name.- Parameters:
name
- structure name- Returns:
- struct descriptor, or null if not found
-