8.5.4. MDOConstr¶
- 
class MDOConstr¶
 在MindOpt应用程序中表示约束
方法
按名称检索约束拥有的int属性值
按名称检索约束拥有的char属性值
按其名称检索约束拥有的double属性值
按名称检索约束拥有的String属性值
检索该约束的索引
测试该约束是否与另一个约束相同
设置约束拥有的int属性的值
设置约束拥有的char属性的值
设置约束拥有的double属性的值
设置约束拥有的String属性的值
- 
int get(MDO_IntAttr attr)¶
 按名称检索约束拥有的int属性值
- 参数
 MDO_IntAttr attr -- 属性名称
- 返回
 属性值
- 
char get(MDO_CharAttr attr)¶
 按名称检索约束拥有的char属性值
- 参数
 MDO_CharAttr attr -- 属性名称
- 返回
 属性值
- 
double get(MDO_DoubleAttr attr)¶
 按其名称检索约束拥有的double属性值
- 参数
 MDO_DoubleAttr attr -- 属性名称
- 返回
 属性值
- 
std::string get(MDO_StringAttr attr)¶
 按名称检索约束拥有的String属性值
- 参数
 MDO_StringAttr attr -- 属性名称
- 返回
 属性值
- 
int index()¶
 检索该约束的索引
- 返回
 该约束的索引
- 
void set(MDO_IntAttr attr, int value)¶
 设置约束拥有的int属性的值
- 参数
 MDO_IntAttr attr -- 属性名称
int value -- 要设置的新值
- 
void set(MDO_CharAttr attr, char value)¶
 设置约束拥有的char属性的值
- 参数
 MDO_CharAttr attr -- 属性名称
char value -- 要设置的新值
- 
void set(MDO_DoubleAttr attr, double value)¶
 设置约束拥有的double属性的值
- 参数
 MDO_DoubleAttr attr -- 属性名称
double value -- 要设置的新值
- 
void set(MDO_StringAttr attr, const std::string &value)¶
 设置约束拥有的String属性的值
- 参数
 MDO_StringAttr attr -- 属性名称
const std::string& value -- 要设置的新值
- 
int get(MDO_IntAttr attr)¶