Tesseract 0.28.4
Loading...
Searching...
No Matches
schema_registration.cpp File Reference

This is a schema registration class. More...

Functions

void tesseract::common::registerSchema (const std::string &key, const std::string &path)
 Register a schema from a file path.
 
void tesseract::common::registerSchema (const std::string &key, const std::function< PropertyTree()> &fn)
 Register a schema from a function.
 
void tesseract::common::registerSchemaDerivedType (const std::string &base_type, const std::string &derived_type)
 Register that a derived type schema can be used where a base type is expected.
 

Detailed Description

This is a schema registration class.

Author
Levi Armstrong
Date
March 1, 2026
License
Software License Agreement (Apache License)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ registerSchema() [1/2]

void tesseract::common::registerSchema ( const std::string &  key,
const std::string &  path 
)

Register a schema from a file path.

Parameters
keyUnique identifier for this schema.
pathPath to a .yaml schema file.

◆ registerSchema() [2/2]

void tesseract::common::registerSchema ( const std::string &  key,
const std::function< PropertyTree()> &  fn 
)

Register a schema from a function.

Parameters
keyUnique identifier for this schema.
fnFunction that returns a PropertyTree schema.

◆ registerSchemaDerivedType()

void tesseract::common::registerSchemaDerivedType ( const std::string &  base_type,
const std::string &  derived_type 
)

Register that a derived type schema can be used where a base type is expected.

Parameters
base_typeThe base type name
derived_typeThe derived type name