C4ValueArraySortPropertycomp Struct Reference
Collaboration diagram for C4ValueArraySortPropertycomp:

Public Member Functions

 C4ValueArraySortPropertycomp (C4String *prop_name)
bool operator() (const C4Value &v1, const C4Value &v2)

Public Attributes

C4ValueArraySortcomp value_sort

Detailed Description

Definition at line 130 of file C4ValueArray.cpp.

Constructor & Destructor Documentation

◆ C4ValueArraySortPropertycomp()

C4ValueArraySortPropertycomp::C4ValueArraySortPropertycomp ( C4String prop_name)

Definition at line 133 of file C4ValueArray.cpp.

133 : prop_name(prop_name) {}

Member Function Documentation

◆ operator()()

bool C4ValueArraySortPropertycomp::operator() ( const C4Value v1,
const C4Value v2 

Definition at line 134 of file C4ValueArray.cpp.

References C4Value::_getPropList(), C4PropList::GetPropertyByS(), and C4Value::Set0().

135  {
136  C4Value p1,p2;
137  if (!v1._getPropList()->GetPropertyByS(prop_name, &p1)) p1.Set0();
138  if (!v2._getPropList()->GetPropertyByS(prop_name, &p2)) p2.Set0();
139  return value_sort(p1,p2);
140  }
void Set0()
Definition: C4Value.h:336
C4PropList * _getPropList() const
Definition: C4Value.h:129
C4ValueArraySortcomp value_sort
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
Definition: C4PropList.cpp:757
Here is the call graph for this function:

Member Data Documentation

◆ prop_name

C4String* C4ValueArraySortPropertycomp::prop_name

Definition at line 132 of file C4ValueArray.cpp.

◆ value_sort

C4ValueArraySortcomp C4ValueArraySortPropertycomp::value_sort

Definition at line 132 of file C4ValueArray.cpp.

The documentation for this struct was generated from the following file: