27#ifndef DBSYMUTL_DEFINED
28#define DBSYMUTL_DEFINED
41#define AC_STRING(name, val) \
42extern 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; }
266 {
return version <=
OdDb::vAC12 ? modelSpaceStr_R12 : modelSpaceStr; }
272 {
return version <=
OdDb::vAC12 ? paperSpaceStr_R12 : paperSpaceStr; }
284 {
return plotStyleNormalNameStr;}
287 {
return standardStr; }
293 {
return standardStr; }
301 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)
OdString left(int length) const
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
GLuint const GLchar * name
@ kEnglish
English system.
bool isLayerDefpointsName(const OdString &name)
const OdString & blockModelSpaceName(OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
const OdString & dimStyleStandardName(OdDb::MeasurementValue measurement)
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)
bool isBlockPaperSpaceName(const OdString &pN, OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
const OdString & linetypeByBlockName()
bool isMLeaderStandardName(const OdString &name)
const OdString & viewportActiveName()
TOOLKIT_EXPORT const OdDbObjectId MLineStyleStandardId(const OdDbDatabase *pDb)
TOOLKIT_EXPORT const OdDbObjectId & dimStyleStandardId(const OdDbDatabase *pDb)
TOOLKIT_EXPORT const OdDbObjectId & textStyleStandardId(const OdDbDatabase *pDb)
OdDbObjectId getPlotstyleId(const OdString &name, const OdDbDatabase *pDb)
const OdString & plotStyleNormalName()
const OdString & linetypeByLayerName()
const OdString & SectionViewStyleStandardName(OdDbDatabase *pDb)
bool isTextStyleStandardName(const OdString &name)
const OdString & layerDefpointsName()
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)
bool isLayerZeroName(const OdString &name)
const OdString & blockPaperSpaceName(OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
const OdString & textStyleStandardName()
OdDbObjectId getTextStyleId(const OdString &name, const OdDbDatabase *pDb)
const OdString & DetailViewStyleStandardName(OdDbDatabase *pDb)
TOOLKIT_EXPORT const OdDbObjectId getLayerId(OdDbDatabase *pDb, const OdString &strLayer)
TOOLKIT_EXPORT OdResult validatePreExtendedSymbolName(const OdString &name, const OdDbDatabase *pDb, bool allowVerticalBar=false)
bool isLinetypeContinuousName(const OdString &name)
OdDbObjectId getVisualStyleId(const OdString &name, const OdDbDatabase *pDb)
bool isDetailViewStyleStandardName(OdDbDatabase *pDb, const OdString &name)
const OdString & layerZeroName()
const OdString & MLeaderStyleStandardName()
OdString getSymbolName(const OdDbObjectId &objId)
bool isSectionViewStyleStandardName(OdDbDatabase *pDb, const OdString &name)
OdDbObjectId getMLStyleId(const OdString &name, const OdDbDatabase *pDb)
bool isLinetypeByLayerName(const OdString &name)
bool isKindOfBlockPaperSpaceName(const OdString &pN, OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
bool isBlockModelSpaceName(const OdString &pN, OdDb::DwgVersion version=OdDb::kDHL_CURRENT)
bool isTableStandardName(const OdString &name)
const OdString & TableStyleStandardName()
const OdString & MLineStyleStandardName()
TOOLKIT_EXPORT bool getMaxSymbolNameLength(OdUInt32 &maxLength, OdUInt32 &maxSize, bool isNewName, bool compatibilityMode)
bool isMLineStandardName(const OdString &name)
const OdString & linetypeContinuousName()
OdDbObjectId getTableStyleId(const OdString &name, const OdDbDatabase *pDb)