CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdIdsIdsValue.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25
26#pragma once
27
28#include <OdIds.h>
29#include <OdAnsiString.h>
30#include <OdXmlRestriction.h>
31// Additional user data may be written here, marked with "///USER INCLUDES" at the beginning and "///USER END" at the end
32
33class OdIdsIdsValue;
36
38// Additional user data may be written here, marked with "///USER TYPEDEFS" at the beginning and "///USER END" at the end
39
40class ODIDS_DLLEXPORT OdIdsIdsValue : public OdRxObject
41{
42// Additional user data may be written here, marked with "///USER CLASS START" at the beginning and "///USER END" at the end
43protected:
44 xmlNode* _node = nullptr;
46public:
52private:
53 OdRxValue _value;
54 ChoiceTypeSelector _choiceTypeSelector;
55// Additional user data may be written here, marked with "///USER MEMBER DECLARATIONS" at the beginning and "///USER END" at the end
56public:
60 void readXml(xmlNode* node);
61 void writeXml(xmlNode* node) const;
62 virtual void __load(bool markAsLoaded = true);
63 inline void __load(bool markAsLoaded = true) const {
64 const_cast<OdIdsIdsValue*>(this)->__load(markAsLoaded);
65 }
66 bool isLoaded() const { return _node == nullptr; }
67 OdAnsiString getXmlDocumentationString(){ if (!isLoaded()) { __load(); } return _documentationString; }
68 void setXmlDocumentationString(OdAnsiString s) { if (!isLoaded()) { __load(); } _documentationString = s; }
69 ChoiceTypeSelector getChoiceType() { if(!isLoaded()) {__load();} return _choiceTypeSelector; }
70 OdRxValue getRawvalue() { if(!isLoaded()) {__load();} return _value; }
71 OdAnsiString* getSimpleValue() { if(!isLoaded()) {__load();} return rxvalue_cast<OdAnsiString>(&_value); }
72 const OdAnsiString* getSimpleValue() const { if(!isLoaded()) {__load();} return rxvalue_cast<OdAnsiString>(&_value); }
73 void setSimpleValue(OdAnsiString val) { if(!isLoaded()) {__load();} _value = val; }
76 void setRestriction(const OdArray<OdXmlRestriction>& val) { if(!isLoaded()) {__load();} _value = val; }
77};
#define ODIDS_DLLEXPORT
Definition OdIds.h:35
OdArray< OdIdsIdsValuePtr > OdIdsIdsValuePtrArray
OdSmartPtr< OdIdsIdsValue > OdIdsIdsValuePtr
ValueType * rxvalue_cast(OdRxValue *value)
Definition RxValue.h:309
#define ODRX_DECLARE_VALUE_TYPE(type, attribute)
Definition RxValue.h:801
OdArray< OdXmlRestriction > * getRestriction()
OdRxValue getRawvalue()
void setRestriction(const OdArray< OdXmlRestriction > &val)
bool isLoaded() const
OdAnsiString _documentationString
void setSimpleValue(OdAnsiString val)
virtual void __load(bool markAsLoaded=true)
ChoiceTypeSelector getChoiceType()
void setXmlDocumentationString(OdAnsiString s)
void writeXml(xmlNode *node) const
OdAnsiString * getSimpleValue()
void __load(bool markAsLoaded=true) const
xmlNode * _node
void readXml(xmlNode *node)
OdAnsiString getXmlDocumentationString()
const OdArray< OdXmlRestriction > * getRestriction() const
ODRX_DECLARE_MEMBERS(OdIdsIdsValue)
const OdAnsiString * getSimpleValue() const