Changeset 3574
- Timestamp:
- 05/01/07 19:12:56 (6 years ago)
- Location:
- platform/logService
- Files:
-
- 12 modified
-
LogAdministrator_impl.cpp (modified) (3 diffs)
-
LogAdministrator_impl.h (modified) (1 diff)
-
LogConsumer_impl.cpp (modified) (3 diffs)
-
LogConsumer_impl.h (modified) (1 diff)
-
LogProducer_impl.cpp (modified) (1 diff)
-
LogProducer_impl.h (modified) (1 diff)
-
LogStatus_impl.cpp (modified) (3 diffs)
-
LogStatus_impl.h (modified) (2 diffs)
-
Log_impl.cpp (modified) (1 diff)
-
Log_impl.h (modified) (1 diff)
-
Makefile (modified) (1 diff)
-
main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/logService/LogAdministrator_impl.cpp
r3537 r3574 1 1 #include "LogAdministrator_impl.h" 2 2 3 LogAdministrator_impl::LogAdministrator_impl() : 4 LogStatus_impl() 3 LogAdministrator_impl::LogAdministrator_impl() 4 { 5 6 } 7 8 LogAdministrator_impl::LogAdministrator_impl(unsigned long long max_length) : 9 LogStatus_impl(max_length) 5 10 { 6 11 … … 26 31 // Set flags 27 32 } 28 29 30 33 } 31 34 … … 51 54 void LogAdministrator_impl::destroy() 52 55 { 53 // Removes sequence. Undefined behavior.56 // Deletes log. Undefined behavior. 54 57 test_mutex->acquire(); 55 58 delete log_record_sequence; -
platform/logService/LogAdministrator_impl.h
r3486 r3574 14 14 public: 15 15 LogAdministrator_impl(); 16 LogAdministrator_impl(unsigned long long max_length); 16 17 ~LogAdministrator_impl(); 17 18 -
platform/logService/LogConsumer_impl.cpp
r3571 r3574 1 1 #include "LogConsumer_impl.h" 2 2 3 LogConsumer_impl::LogConsumer_impl() : LogStatus_impl() 3 LogConsumer_impl::LogConsumer_impl() 4 { 5 6 } 7 8 LogConsumer_impl::LogConsumer_impl(unsigned long long max_length) : 9 LogStatus_impl(max_length) 4 10 { 5 11 … … 14 20 LogConsumer_impl::get_record_id_from_time(const CosLwLog::LogTime& fromTime) 15 21 { 16 return 0; 22 // There is currently no time 23 return 0; 17 24 } 18 25 … … 21 28 howMany) 22 29 { 23 // Return pointer is callers responsibilty to deallocate 30 // Return pointer is callers responsibilty to deallocate? 24 31 CosLwLog::LogRecordSequence* return_sequence; 25 32 26 33 test_mutex->acquire(); 27 34 35 // Possibly change this create the new sequence with the data constructor 28 36 return_sequence = new CosLwLog::LogRecordSequence(*log_record_sequence); 29 37 return_sequence->length(log_record_size); -
platform/logService/LogConsumer_impl.h
r3486 r3574 14 14 public: 15 15 LogConsumer_impl(); 16 LogConsumer_impl(unsigned long long max_length); 16 17 ~LogConsumer_impl(); 17 18 -
platform/logService/LogProducer_impl.cpp
r3536 r3574 3 3 #include <iostream> 4 4 5 LogProducer_impl::LogProducer_impl() : LogStatus_impl() 5 LogProducer_impl::LogProducer_impl() 6 { 7 8 } 9 10 LogProducer_impl::LogProducer_impl(unsigned long long max_length) : 11 LogStatus_impl(max_length) 6 12 { 7 13 -
platform/logService/LogProducer_impl.h
r3486 r3574 13 13 public: 14 14 LogProducer_impl(); 15 LogProducer_impl(unsigned long long max_length); 15 16 ~LogProducer_impl(); 16 17 -
platform/logService/LogStatus_impl.cpp
r3571 r3574 5 5 LogStatus_impl::LogStatus_impl() 6 6 { 7 std::cout << "Default constructor called" << std::endl; 8 9 LogStatus_impl::LogStatus_impl(MAX_SIZE_DEFAULT); 10 } 11 12 LogStatus_impl::LogStatus_impl(unsigned long long max_size) 13 { 14 std::cout << "Other constructor called" << std::endl; 15 7 16 test_mutex = new omni_mutex(); 8 17 test_mutex->release(); 9 18 10 19 log_record_size = 0; 11 log_record_max_size = 1000;20 log_record_max_size = max_size; 12 21 13 22 log_record_sequence = new CosLwLog::LogRecordSequence(); 14 log_record_sequence->length( log_record_max_size);23 log_record_sequence->length(max_size); 15 24 16 25 operational_state = CosLwLog::disabled; … … 24 33 LogStatus_impl::~LogStatus_impl() 25 34 { 35 // Wait for existing r/w to complete 36 // Administrator can also delete sequence, behavior undefined 37 test_mutex->acquire(); 38 delete log_record_sequence; 39 delete test_mutex; 26 40 27 41 } … … 41 55 unsigned long long LogStatus_impl::get_n_records() 42 56 { 43 // See what this does57 // Figure what this should do 44 58 return 0; 45 59 } -
platform/logService/LogStatus_impl.h
r3534 r3574 1 1 #include "CosLwLogStatus.h" 2 3 #define MAX_SIZE_DEFAULT 1000 2 4 3 5 class LogStatus_impl : public virtual POA_CosLwLog::LogStatus … … 20 22 public: 21 23 LogStatus_impl(); 24 LogStatus_impl(unsigned long long max_length); 22 25 ~LogStatus_impl(); 23 26 -
platform/logService/Log_impl.cpp
r3486 r3574 1 1 #include "Log_impl.h" 2 2 3 Log_impl::Log_impl() 3 Log_impl::Log_impl(unsigned long long max_length) : 4 LogStatus_impl(max_length) 4 5 { 5 6 -
platform/logService/Log_impl.h
r3486 r3574 10 10 public LogConsumer_impl 11 11 { 12 Log_impl( );12 Log_impl(unsigned long long max_length); 13 13 ~Log_impl(); 14 14 }; -
platform/logService/Makefile
r3486 r3574 1 1 CFLAGS = -Wall 2 2 SOURCES = LogStatus_impl.cpp LogProducer_impl.cpp LogConsumer_impl.cpp LogAdministrator_impl.cpp Log_impl.cpp main.cpp CosLwLogStatusSK.cpp CosLwLogProducerSK.cpp CosLwLogConsumerSK.cpp CosLwLogAdministratorSK.cpp CosLwLogServiceSK.cpp 3 LIBS = -lomniORB4 -lossieparser -lossiecf -lossieidl3 LIBS = -lomniORB4 4 4 INCLUDE = -I. 5 5 -
platform/logService/main.cpp
r3571 r3574 18 18 rootContext = CosNaming::NamingContextExt::_narrow(initServ); 19 19 20 Log_impl* log_servant = new Log_impl( );20 Log_impl* log_servant = new Log_impl(1000); 21 21 PortableServer::ObjectId_var log_id = poa->activate_object(log_servant); 22 22 CosLwLog::Log_var log_var = log_servant->_this();