This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
I have two template clases with specializations
template <class T> class ModBusIB; template <class T> class ModBusIR; template <class T> class ModBusOB; template <class T> class ModBusOR; template <class T1, class T2 = void, class T3 = void, class T4 = void> class ModBusFram; template <class T> class ModBusFram<ModBusIB<T>, void, void, void > { public: T InputBits; }; template <class T1, class T2, class T3, class T4> class ModBusFram<ModBusIB<T1>, ModBusIR<T2>, ModBusOB<T3>, ModBusOR<T4> > { public: T1 InputBits; T2 InputRegs; T3 OutputBits; T4 OutputRegs; }; /**************************************************************************************************************************/ /*MODBUS SRAM TEMPLATES */ /**************************************************************************************************************************/ template <class T1, class T2 = void, class T3 = void, class T4 = void> class ModBusSram; template <class T1, class T2, class T3, class T4> class ModBusSram<ModBusIB<T1>, ModBusIR<T2>, ModBusOB<T3>, ModBusOR<T4> > { public: T1 InputBits; T2 InputRegs; T3 OutputBits; T4 OutputRegs; }; template <class T1, class T2> class ModBusSram<ModBusIB<T1>, ModBusOB<T2> > { public: T1 InputBits; T2 OutputBits; };
When I declare objects of these classes
enum EventsTimePrescale { EventStart, EventEnd }; typedef struct { bool isActive; } FO_Bits_Events; typedef struct { float CriticalValues[3]; } FO_Regs_Events; typedef struct { bool isEnable; bool isAlarmEnable; bool isAckEnable; } FI_Bits_Events; typedef struct { unsigned short TimePrescale[2]; float Prescale; } FI_Regs_Events; typedef struct { bool isDefaultsApply; bool isWarning; } SI_Bits_Events; typedef struct { bool isAlarm; } SO_Bits_Events; ModBusFram < ModBusIB<FI_Bits_Events>, ModBusIR<FI_Regs_Events>, ModBusOB<FO_Bits_Events>, ModBusOR<FO_Regs_Events> > TestFram; ModBusSram < ModBusIB<SI_Bits_Events>, ModBusOB<SO_Bits_Events> > TestSram;
I can see without problems pop up list of class members when i put a period, like in the picture below
But when I declare the third template class using the first two as parameters, I do not see a pop-up list of the parameters of this template
template <class T1, class T2 = void> class ModBusDirect; template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> class ModBusDirect<ModBusSram<T1, T2, T3, T4>, ModBusFram<T5, T6, T7, T8> > { public: ModBusSram<T1, T2, T3, T4> *Sram; ModBusFram<T5, T6, T7, T8> *Fram; ModBusFram<T5, T6, T7, T8> *Defaults; };
ModBusDirect < ModBusSram < ModBusIB<SI_Bits_Events>, ModBusOB<SO_Bits_Events> >, ModBusFram < ModBusIB<FI_Bits_Events>, ModBusIR<FI_Regs_Events>, ModBusOB<FO_Bits_Events>, ModBusOR<FO_Regs_Events> > > Direct;
When i put a period after variable Direct I do not see a pop-up list of the parameters of this template! Why?
However, all members of this template class are successfully compiled, such as Direct.Fram.OutputBits.isActive = true;
Thanks for the prompt response! I cleaned my working project and left it only a demonstration of the presence and absence of a pop-up list of members of the template class. I could not attach the project to the zip format because it weighs more than 20 megabytes (28 Mb) in the archive. For this, I attach the project archived to the 7z format and put a link to the same project in zip format in my onedrive
I reinstalled CCS twice with no effect, after that I delete project from Project Explorer, Import it and bingo! Pop ups for all my templates class objects work! Thanks for the help and efficiency!