KiCad PCB EDA Suite
Loading...
Searching...
No Matches
odb_attribute.h File Reference
#include "odb_util.h"
#include "stroke_params.h"
#include <wx/string.h>
#include <string>
#include <type_traits>

Go to the source code of this file.

Classes

struct  ODB_ATTR::AttributeBase< T, AttrType >
 
struct  ODB_ATTR::FloatAttribute< T, N >
 
struct  ODB_ATTR::BooleanAttribute< T >
 
struct  ODB_ATTR::TextAttribute< T >
 
struct  ODB_ATTR::OPTION_Attribute< T >
 
struct  ODB_ATTR::AttributeName< T >
 
struct  ODB_ATTR::Attribute< Tag, Attr, AttrType, N >
 
struct  ODB_ATTR::AttributeSimple< Tag, Attr, AttrType >
 
struct  ODB_ATTR::IsFeature< T >
 
struct  ODB_ATTR::IsNet< T >
 
struct  ODB_ATTR::IsPkg< T >
 
struct  ODB_ATTR::IsLayer< T >
 
struct  ODB_ATTR::IsStep< T >
 
struct  ODB_ATTR::IsComp< T >
 
struct  ODB_ATTR::IsProductModel< T >
 
struct  ODB_ATTR::IsSymbol< T >
 
class  ATTR_MANAGER
 
class  ATTR_RECORD_WRITER
 

Namespaces

namespace  ODB_ATTR
 

Macros

#define DEFINE_ATTR(Tag, Attr, AttrType, AttrName, ...)
 
#define DEFINE_ATTR_SIMPLE(Tag, Attr, AttrType, AttrName)
 
#define DEFINE_FLOAT_ATTR(NAME, N)   DEFINE_ATTR( NAME, FloatAttribute, TYPE::FLOAT, #NAME, N )
 
#define DEFINE_BOOLEAN_ATTR(NAME)    DEFINE_ATTR_SIMPLE( NAME, BooleanAttribute, TYPE::BOOLEAN, #NAME )
 
#define DEFINE_TEXT_ATTR(NAME)   DEFINE_ATTR_SIMPLE( NAME, TextAttribute, TYPE::TEXT, #NAME )
 
#define DEFINE_OPTION_ATTR(NAME)
 
#define USED_BY_FEATURE_ENTITY(NAME)
 
#define USED_BY_NET_ENTITY(NAME)
 
#define USED_BY_PKG_ENTITY(NAME)
 

Enumerations

enum class  ODB_ATTR::TYPE {
  ODB_ATTR::FLOAT , ODB_ATTR::BOOLEAN , ODB_ATTR::TEXT , ODB_ATTR::OPTION ,
  ODB_ATTR::INTEGER
}
 
enum class  ODB_ATTR::DRILL { ODB_ATTR::PLATED , ODB_ATTR::NON_PLATED , ODB_ATTR::VIA }
 
enum class  ODB_ATTR::PAD_USAGE {
  ODB_ATTR::TOEPRINT , ODB_ATTR::VIA , ODB_ATTR::G_FIDUCIAL , ODB_ATTR::L_FIDUCIAL ,
  ODB_ATTR::TOOLING_HOLE , ODB_ATTR::BOND_FINGER
}
 
enum class  ODB_ATTR::PLATED_TYPE { ODB_ATTR::STANDARD , ODB_ATTR::PRESS_FIT }
 
enum class  ODB_ATTR::VIA_TYPE { ODB_ATTR::DRILLED , ODB_ATTR::LASER , ODB_ATTR::PHOTO }
 

Macro Definition Documentation

◆ DEFINE_ATTR

#define DEFINE_ATTR (   Tag,
  Attr,
  AttrType,
  AttrName,
  ... 
)
Value:
struct Tag##_t \
{ \
}; \
constexpr const char Tag##_name[] = AttrName; \
using Tag = Attribute<Tag##_t, Attr, AttrType, __VA_ARGS__>::TYPE; \
template <> \
struct AttributeName<Tag> \
{ \
static constexpr const char* name = Tag##_name; \
};
const char * name
Definition: DXF_plotter.cpp:57

Definition at line 136 of file odb_attribute.h.

◆ DEFINE_ATTR_SIMPLE

#define DEFINE_ATTR_SIMPLE (   Tag,
  Attr,
  AttrType,
  AttrName 
)
Value:
struct Tag##_t \
{ \
}; \
constexpr const char Tag##_name[] = AttrName; \
using Tag = AttributeSimple<Tag##_t, Attr, AttrType>::TYPE; \
template <> \
struct AttributeName<Tag> \
{ \
static constexpr const char* name = Tag##_name; \
};

Definition at line 148 of file odb_attribute.h.

◆ DEFINE_BOOLEAN_ATTR

#define DEFINE_BOOLEAN_ATTR (   NAME)     DEFINE_ATTR_SIMPLE( NAME, BooleanAttribute, TYPE::BOOLEAN, #NAME )

Definition at line 163 of file odb_attribute.h.

◆ DEFINE_FLOAT_ATTR

#define DEFINE_FLOAT_ATTR (   NAME,
 
)    DEFINE_ATTR( NAME, FloatAttribute, TYPE::FLOAT, #NAME, N )

Definition at line 161 of file odb_attribute.h.

◆ DEFINE_OPTION_ATTR

#define DEFINE_OPTION_ATTR (   NAME)
Value:
struct NAME##_t \
{ \
}; \
template <> \
struct AttributeSimple<NAME##_t, OPTION_Attribute, TYPE::OPTION>; \
template <> \
struct AttributeName<NAME> \
{ \
static constexpr const char* name = #NAME; \
};
SIM_MODEL::TYPE TYPE
Definition: sim_model.cpp:57

Definition at line 168 of file odb_attribute.h.

◆ DEFINE_TEXT_ATTR

#define DEFINE_TEXT_ATTR (   NAME)    DEFINE_ATTR_SIMPLE( NAME, TextAttribute, TYPE::TEXT, #NAME )

Definition at line 166 of file odb_attribute.h.

◆ USED_BY_FEATURE_ENTITY

#define USED_BY_FEATURE_ENTITY (   NAME)
Value:
template <> \
struct IsFeature<NAME> : std::true_type \
{ \
};

Definition at line 182 of file odb_attribute.h.

◆ USED_BY_NET_ENTITY

#define USED_BY_NET_ENTITY (   NAME)
Value:
template <> \
struct IsNet<NAME> : std::true_type \
{ \
};

Definition at line 188 of file odb_attribute.h.

◆ USED_BY_PKG_ENTITY

#define USED_BY_PKG_ENTITY (   NAME)
Value:
template <> \
struct IsPkg<NAME> : std::true_type \
{ \
};

Definition at line 194 of file odb_attribute.h.