KiCad PCB EDA Suite
PROPERTIES Class Reference

Class PROPERTIES is a name/value tuple with unique names and optional values. More...

#include <properties.h>

Inheritance diagram for PROPERTIES:

Public Member Functions

bool Clear (const std::string &aProperty)
 
bool Exists (const std::string &aProperty) const
 
bool Value (const char *aName, UTF8 *aFetchedValue=NULL) const
 Function Value fetches a property by aName and returns true if that property was found, else false. More...
 

Detailed Description

Class PROPERTIES is a name/value tuple with unique names and optional values.

The names may be iterated alphabetically.

Definition at line 34 of file properties.h.

Member Function Documentation

bool PROPERTIES::Clear ( const std::string &  aProperty)
inline

Definition at line 39 of file properties.h.

40  {
41  return erase( aProperty ) > 0;
42  }
bool PROPERTIES::Exists ( const std::string &  aProperty) const
inline

Definition at line 44 of file properties.h.

Referenced by SCH_LEGACY_PLUGIN::isBuffering().

45  {
46  return count( aProperty ) > 0;
47  }
bool PROPERTIES::Value ( const char *  aName,
UTF8 aFetchedValue = NULL 
) const

Function Value fetches a property by aName and returns true if that property was found, else false.

If not found, aFetchedValue is not touched.

Parameters
aNameis the property or option to look for.
aFetchedValueis where to put the value of the property if it exists and aFetchedValue is not NULL.
Returns
bool - true if property is found, else false.

Definition at line 24 of file properties.cpp.

Referenced by GITHUB_PLUGIN::cacheLib(), EAGLE_PLUGIN::centerBoard(), and DIALOG_FP_PLUGIN_OPTIONS::onListBoxItemSelected().

25 {
26  PROPERTIES::const_iterator it = find( aName );
27 
28  if( it != end() )
29  {
30  if( aFetchedValue )
31  *aFetchedValue = it->second;
32 
33  return true;
34  }
35 
36  return false;
37 }

The documentation for this class was generated from the following files: