27 #ifndef DBSYMUTL_DEFINED
28 #define DBSYMUTL_DEFINED
41 #define AC_STRING(name, val) \
42 extern TOOLKIT_EXPORT_GLOBAL const OdConstString name;
58 bool allowVerticalBar =
false,
59 const OdChar symSubst = L
'_',
60 bool insertPrefix =
true);
75 bool allowVerticalBar =
false,
76 const OdChar symSubst = L
'_',
77 bool insertPrefix =
true);
82 bool allowVerticalBar =
false);
95 bool allowVerticalBar =
false);
101 bool compatibilityMode);
109 return pRec->getName();
114 #define DBSYMUTL_MAKE_GETSYMBOLID_FUNC(T_TABLE) \
115 inline OdDbObjectId \
116 get ## T_TABLE ## Id(const OdString& name, const OdDbDatabase *pDb) \
118 if (!pDb) return OdDbObjectId::kNull; \
119 OdDbSymbolTablePtr pTable = pDb->get ## T_TABLE ## TableId().safeOpenObject(); \
120 ODA_ASSERT(!pTable->isOdDbObjectIdsInFlux()); \
121 return pTable->getAt(name); \
139 if (!pRec->isShapeFile())
140 return pRec->objectId();
146 #undef DBSYMUTL_MAKE_GETSYMBOLID_FUNC
155 return pDic->getAt(
name);
167 return pDic->getAt(
name);
179 return pDic->getAt(
name);
191 return pDic->getAt(
name);
203 return pDic->getAt(
name);
209 {
return byLayerNameStr; }
215 {
return byBlockNameStr; }
221 {
return linetypeContinuousNameStr; }
227 {
return layerZeroNameStr; }
233 {
return layerDefpointsNameStr; }
239 {
return standardStr; }
242 {
return standardStr; }
248 {
return measurement ==
OdDb::kEnglish ? standardStr : metricDimStandardStr; }
251 {
return viewportActiveNameStr; }
276 {
return plotStyleNormalNameStr;}
279 {
return standardStr; }
285 {
return standardStr; }
293 return (pDb && pDb->getMEASUREMENT() ==
OdDb::kMetric) ? standardMetricDictStr : standardImperialDictStr;
#define DBSYMUTL_MAKE_GETSYMBOLID_FUNC(T_TABLE)
#define ODA_ASSERT_ONCE(exp)
OdDbObjectId getVisualStyleDictionaryId(bool createIfNotFound=true) const
OdDbObjectId getMLStyleDictionaryId(bool createIfNotFound=true) const
OdDbObjectId getTableStyleDictionaryId(bool createIfNotFound=true) const
OdDbObjectId getMLeaderStyleDictionaryId(bool createIfNotFound=true) const
OdDbObjectId getPlotStyleNameDictionaryId(bool createIfNotFound=true) const
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
OdResult openObject(OdDbObjectPtr &pObj, OdDb::OpenMode openMode=OdDb::kForRead, bool openErasedOne=false) const
static OdRxObjectPtr cast(const OdRxObject *pointer)
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
GLuint const GLchar * name
@ kEnglish
English system.
bool isLayerDefpointsName(const OdString &name)
TOOLKIT_EXPORT OdResult repairPreExtendedSymbolName(OdString &newName, const OdString &oldName, const OdDbDatabase *pDb, bool allowVerticalBar=false, const OdChar symSubst=L '_', bool insertPrefix=true)
bool isViewportActiveName(const OdString &name)
OdDbObjectId getMLeaderStyleId(const OdString &name, const OdDbDatabase *pDb)
TOOLKIT_EXPORT OdResult validateSymbolName(const OdString &name, const OdDbDatabase *pDb, bool allowVerticalBar=false)
const OdString & SectionViewStyleStandardName(OdDbDatabase *pDb)
const OdString & plotStyleNormalName()
bool isBlockPaperSpaceName(const OdString &pN, OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
const OdString & linetypeByBlockName()
const OdString & layerZeroName()
bool isMLeaderStandardName(const OdString &name)
OdDbObjectId getPlotstyleId(const OdString &name, const OdDbDatabase *pDb)
TOOLKIT_EXPORT const OdDbObjectId MLineStyleStandardId(OdDbDatabase *pDb)
const OdString & TableStyleStandardName()
const OdString & textStyleStandardName()
const OdString & DetailViewStyleStandardName(OdDbDatabase *pDb)
bool isTextStyleStandardName(const OdString &name)
bool isLinetypeByBlockName(const OdString &name)
TOOLKIT_EXPORT OdResult repairSymbolName(OdString &newName, const OdString &oldName, const OdDbDatabase *pDb, bool allowVerticalBar=false, const OdChar symSubst=L '_', bool insertPrefix=true)
const OdString & linetypeByLayerName()
const OdString & viewportActiveName()
bool isLayerZeroName(const OdString &name)
const OdString & dimStyleStandardName(OdDb::MeasurementValue measurement)
const OdString & MLineStyleStandardName()
OdDbObjectId getTextStyleId(const OdString &name, const OdDbDatabase *pDb)
TOOLKIT_EXPORT OdResult validatePreExtendedSymbolName(const OdString &name, const OdDbDatabase *pDb, bool allowVerticalBar=false)
const OdString & linetypeContinuousName()
bool isLinetypeContinuousName(const OdString &name)
OdDbObjectId getVisualStyleId(const OdString &name, const OdDbDatabase *pDb)
bool isDetailViewStyleStandardName(OdDbDatabase *pDb, const OdString &name)
const OdString & MLeaderStyleStandardName()
OdString getSymbolName(const OdDbObjectId &objId)
bool isSectionViewStyleStandardName(OdDbDatabase *pDb, const OdString &name)
const OdString & blockPaperSpaceName(OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
const OdString & blockModelSpaceName(OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
OdDbObjectId getMLStyleId(const OdString &name, const OdDbDatabase *pDb)
bool isLinetypeByLayerName(const OdString &name)
bool isBlockModelSpaceName(const OdString &pN, OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
bool isTableStandardName(const OdString &name)
TOOLKIT_EXPORT const OdDbObjectId & textStyleStandardId(OdDbDatabase *pDb)
TOOLKIT_EXPORT bool getMaxSymbolNameLength(OdUInt32 &maxLength, OdUInt32 &maxSize, bool isNewName, bool compatibilityMode)
TOOLKIT_EXPORT const OdDbObjectId & dimStyleStandardId(OdDbDatabase *pDb)
bool isMLineStandardName(const OdString &name)
OdDbObjectId getTableStyleId(const OdString &name, const OdDbDatabase *pDb)
const OdString & layerDefpointsName()