Class StructDescriptorDatabase

java.lang.Object
edu.wpi.first.util.struct.StructDescriptorDatabase

public class StructDescriptorDatabase extends Object
Database of raw struct dynamic descriptors.
  • Constructor Details

  • Method Details

    • add

      public StructDescriptor add(String name, String schema) throws BadSchemaException
      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 name
      schema - structure schema
      Returns:
      Added struct dynamic descriptor
      Throws:
      BadSchemaException - if schema invalid
    • find

      public StructDescriptor find(String name)
      Finds a structure in the database by name.
      Parameters:
      name - structure name
      Returns:
      struct descriptor, or null if not found