• HOME
  • ABOUT
    AD&Co
    AD&Co Staff Vendor Partners News & Events Press Releases AD&Co in the News Contact Us
  • VECTORS™
    ANALYTICS
    Prepayment Credit Valuation RiskProfiler™ CreditProfile™
  • CONSULTING
  • PUBLICATIONS
    & RESEARCH
    The Pipeline The Pipeline Archives Quantitiative Perspectives Library Books & Papers Presentations
  • ONLINE TOOLS
    & REPORTS
    Model Demos Mortgage Analysis & Performance Reporting Market Valuation Reports Trend Reports CreditProfile™
  • VECTORS™
    SUPPORT
    Downloads FAQs Glossary Installation and Version Compatibility Model Description Model Validation Tuning Support User Manuals/Tutorials/Guides Release Notes Developer Support
  • My AD&Co
 
    Quick Links
  • API Integration coding for developers
  • | Future Navigation
  • | Future Navigation
  • | Future Navigation

API INTEGRATION CODING FOR DEVELOPERS

Parameter Class: adco_CParam

Description

The adco_CParam class is used to encapsulate varying types of data so there need only be one each of the various GetParam/SetParam methods. Numeric data is stored internally, all other data types are stored as pointers or references. For this reason, non-numeric expressions should not be encapsulated. Value extraction is via cast operators. You can also determine the type of data stored via the VarType method. This returns an element of the "Parameter Types" constant enumerated list which can be found via the exported global constant pAdco_ParamTypes. List Element constants are also exported for each type (see table).

Public Constructors

adco_CParam( int ival )

Create a Parameter from an integer value.

adco_CParam( double dval )

Create a Parameter from a double value.

adco_CParam( const char* sval )

Create a parameter from a null termnated string. Note only the pointer is stored, the string is not duplicated internally.

adco_CParam( const adco_cEnumElem& eval )

Create a parameter from an element of an Enumerated List.

adco_CParam( adco_TimeSeries& tsval )

Create a parameter from a timeseries object. Again, note that only a reference is stored, not a copy of the timeseries.

adco_CParam( void* pval )

               Create a parameter from a pointer to arbitrary user data.

Copy Constructor and Assignment

adco_CParam( const adco_CParam& cpval )

Copy Constructor.

adco_CParam& operator=( const adco_CParam& cpval )

Copy by assignment.

Extract: Caution - may throw conversion error

operator int(void) const

Extract an int value. Standard C conversion for doubles.. Element Index for Enumerated values. Will attempt to translate strings.

operator double(void) const

Extract a double value. See above.

operator const char *(void) const

Extract a string value. Numerics are formated. Enumerated values return the element name.

operator adco_cEnumElem(void) const

Extract an Enumerated List Element.

operator adco_TimeSeries&(void) const

Extract a reference to a timeseries object.

operator void*(void) const

Extract a pointer to user data.

Properties

const adco_cEnumElem& VarType() const

Extract a list element describing the parameter content type.

Table of Parameter Types Exported Constant Name Data Type

Exported Constant Name Data Type
ADCO_INTTYPE INTEGER Integer Type
ADCO_DBLTYPE DOUBLE Double Type
ADCO_STRTYPE SPRING Null Terminated String Ptr
ADCO_ENUMTYPE ENUM Adco Enumeration Element
ADCO_TSTYPE TIMESERIES adco_TimeSeries Object Ref
ADCO_UDPTRTYPE UDATPTR User Data Pointer

 

 




65 Bleecker St., Fifth Floor New York NY 10012   tel 212.274.9075   fax 212.274.0545
© 2012 Andrew Davidson & Co., Inc.