Property Class Reference

#include <Pt/Mcp/Type.h>

Named slot of an object schema or a tool parameter. More...

Public Member Functions

 Property (const std::string &name, const Type &type, const std::string &description="")
 Creates a required property named name of type.
const std::string & name () const
 Returns the property name.
const Typetype () const
 Returns the schema type of this property.
const std::string & description () const
 Returns the schema description of this property.
bool isRequired () const
 Returns true when the property is required.
void setOptional ()
 Marks the property as optional.

Detailed Description

Property is the name, type, description, and required flag the schema group uses for both ObjectType members and Tool parameters. The type is not owned; it must outlive the property. A new property is required. setOptional() clears that flag.

Constructor & Destructor Documentation

◆ Property()

Property ( const std::string & name,
const Type & type,
const std::string & description = "" )

description is the schema description of this property.